[prog] C++ stringstream or something else?

Sue Stones suzo at bigpond.net.au
Tue Apr 15 22:29:58 EST 2003

Ok I am using stringsream and it compiles but I am not getting the output that 
I want.

I have something like this
stringstream ss;
ss << char_star_variable << "\t" << int_variable << somefunction("returning a 
double") << std::endl;

This seems to be OK but when I print it I get only the value of the first 
variable printed.  I am guessing that it is because it gets to a "\0".

Can I do something like the above or am I trying to make the stringstream do 
something it isn't intended to do?  If I can do something like that how do I 
get rid of the null?  If I can't how do I deal with this situation?


More information about the Programming mailing list