c++ int to string

C++
#include <string>
using namespace std;

int iIntAsInt = 658;
string sIntAsString = to_string(iIntAsInt);int a = 10;
stringstream ss;
ss << a;
string str = ss.str();#include <string> 

std::string s = std::to_string(42);std::to_string(23213.123)int a = 10;
char *intStr = itoa(a);
string str = string(intStr);// EXAMPLE
int iIntAsInt = 658;
std::string sIntAsString = tostring(iIntAsInt);

/* SYNTAX
tostring(<your-integer>)
*/

/* HEADERS
#include <string>
*/
Source

Also in C++: