Hi,
I tried the following code to convert an int to a string:
But it returns an empty string! If I print the "out" variable usingCode:int i = 5678;
string s;
stringstream out;
out << i;
s = out.str();
It prints "0". What could possibly be wrong? I'm using Mac OS X 10.6.1 and gcc version 4.2.1.Code:cout << out << endl;