mardi 31 mars 2015

How to convert int to string [duplicate]


This question already has an answer here:




I this a good way to convert int to string?



int a = 123456789;
string str = static_cast<ostringstream*>(&(ostringstream()<<a))->str();

Aucun commentaire:

Enregistrer un commentaire