int to strinf in cpp code example
Example 1: convert int to string c++
int x = 5;
string str = to_string(x);
Example 2: how to convert int to string c++
int a = 10;
stringstream ss;
ss << a;
string str = ss.str();
int x = 5;
string str = to_string(x);
int a = 10;
stringstream ss;
ss << a;
string str = ss.str();