Possible Duplicate:
std::string formatting like sprintf
Can I use the c++ iostream classes with a format string like printf?
Basically, I want to be able to do something like :-
snprintf (inchars, len, "%4f %6.2f %3d \n", float1, float2, int1);
easily using stringstreams. Is there an easy way to do this?