How to implement this function by basic methods, without using built-in functions.

string str = to_string(i); 

i - number from 2 to 99

    2 answers 2

    For example:

     string s(""); if (i >= 10) s += '0' + i/10; s += '0' + i%10; 
        int i = 5; string str; stringstream ss; ss << i; str = ss.str();