0
How to convert integer to string?
I want to convert an integer say 89 to string "89". In python it could be done easily with str(). How to do this in C++
3 Respuestas
+ 2
int a = 10;
char *intStr = itoa(a);
string str = string(intStr);
0
std::string s = std::to_string(yourInt);
0
Chakib, do i have to include anything before using the code.