Convert int (Integer) to String
 
This code converts an integer to a string:

int someint=1;
ostringstream buffer;
buffer << someint;
string somestr = buffer.str();
// somestr now contains someint as a string!


This piece of code needs inclusion of sstream and of course string too:
#include <string>
#include <sstream>
 
admin / Dec 05, 2008
   
 
 
Login: 
Pass: 
 
 
     
     
2004 - 2019 / lookass.ch
makememad@lookass.ch