For example, only, not the actual code:
stringstream ss; ss << " world!"; string hello("Hello");
Thanks for all the answers, I also found this code that works:
ostringstream& insert( ostringstream& oss, const string& s ) { streamsize pos = oss.tellp(); oss.str( s + oss.str() ); oss.seekp( pos + s.length() ); return oss; }
dlsou source share