c++ - How can I copy value from ostringstream to string? -


i tried :

ostringstream oss; read string file , put oss; string str; str << oss.str();// error here "error: no match ‘operator>>’ in 'oss >> str' " 

if use str = oss.str(); instead of printing value of string, prints out "....0xbfad75c40xbfad75c40xbf...." likes memory address.
can tell me why? thank you.

string str = oss.str(); // should trick 

Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -