Stringstreams
I'm taking a deap breath ... in ................ out .............
Okay. I'm relaxed and ready now.
I rarely use stringstreams because it's such a pain to get them to work. I've looked at about five different websites tonight, used their syntax, their headers, etc. word for word and am still getting compiler errors.
First of all, why are there separate classes for stringstream, istringstream, and ostringstream? Can anyone explain to me why you would ever want a stringstream that's designed for only input or only output? Isn't that like having a box that you can only put things in but never take them out? I don't get that. And that's making it hard for me to know for sure which class to use.
I'm just trying to convert an integer to a string. I'm even trying itoa() which is supposed to be in stdio.h, but the compiler says there's no such thing.
Okay. I'm relaxed and ready now.
I rarely use stringstreams because it's such a pain to get them to work. I've looked at about five different websites tonight, used their syntax, their headers, etc. word for word and am still getting compiler errors.
First of all, why are there separate classes for stringstream, istringstream, and ostringstream? Can anyone explain to me why you would ever want a stringstream that's designed for only input or only output? Isn't that like having a box that you can only put things in but never take them out? I don't get that. And that's making it hard for me to know for sure which class to use.
I'm just trying to convert an integer to a string. I'm even trying itoa() which is supposed to be in stdio.h, but the compiler says there's no such thing.
