I recommend you first decide whether you want to convert to a string or an array of char, these are not the same thing. If you want to use a string then you could use stoi(), if your compiler is set to compile to the current standard, C++11.
yes. they all suggest atoi. But I want to learn more about programming, not just functions I hardly know. I was thinking someone here could show me a code for such. something I can really understand and remember in my life.
I don't think manually converting from int to an array of chars which would the each digit of the number would be helpful in real life because that's something that the c/c++ compiler takes care for us.
C strings (not C++ string) are handled by an array of chars which are managed by pointers. C++ encapsulates the low level string manipulation, which makes string handling a lot easier. When you declare string str = "Hello!";
What the compiler basically sees is char str[] = "Hello!";
Of course, it's more complicated than that but that's the rough idea.
However, if you want to do the reverse, convert from (string) "613" to its int value that is more feasible to do manually.