* How does stringstream work?
Someone kind of explained it like, in cout it sends it to “standard out stream” or something, and using stringstream, you stream it into that instead.
* How can it convert characters into int and such?
* How can you do this? I remember someone doing something similar like:
But that doesn't work for me. Saying it expected a , or ; before >> token.
* Where does the garbage value come from?
string a1="13", a2="25";
int b,c;
stringstream d;
d << a1;
d >> b;
d << a2;
d >>c;
c produces some garbage value, but where is that garbage value coming from?
I can understand a pointer pointing somewhere random, getting a garbage value, but this?
25 -> d -> c. I don't get it?
No comments:
Post a Comment