Hello,
Why does the following code print "fail" instead of "123"
in the vc 2005 beta?
Thanks
-John
#include "stdafx.h"
#include <sstream>
int _tmain(int argc, _TCHAR* argv[])
{
std::stringstream ss("123,456");
int x;
ss >> x;
if (ss.fail()) {
printf("fail");
} else {
printf("%d", x);
}
return 0;
}
ismailp - 27 May 2005 02:29 GMT
what beta do you use?
John Ky - 29 May 2005 12:36 GMT
Beta 2
> what beta do you use?
Jason Murphy - 30 May 2005 12:42 GMT
why do you use "<sstream>"?

Signature
Software is great!!!
> Hello,
>
[quoted text clipped - 25 lines]
> return 0;
> }
John Ky - 30 May 2005 14:10 GMT
The std::stringstream class is in <sstream>
-John
> why do you use "<sstream>"?