maybe your thinking of a situation like this...
const int MaxSize = 1023;
std::stringstream convert;
char temp[MaxSize + 1] ={0};
float val;
// Say we have a control that has a "text" floating point value
GetDlgItemText(IDC_SOME_CONTROL, temp, MaxSize);
convert << temp;
convert >> val;
// if you forgot to call this afterward, you would have issues writing or
reading from the stringstream
convert.clear();
convert.str("");
"Dylan" <sp******@ontheball.com> wrote in message
news:lh********************************@4ax.com...
Is there a string stream I can write into and read from?
I've tried std::stringstream but it won't let me read from it.
ie I can do this:
int iData = 123
std::stringstream ss;
ss << 123;
but not this afterwards:
int iDataReadFromStream;
iDataReadFromStream << ss;
Is there a data structure that allows me to do both?
thanks