Hello! I've just started using stringstream's but I've encountered a problem. Why does this code print 0 ?
#include<iostream>
#include<sstream>
using namespace std;
int main()
{
stringstream ss;
int i;
ss<<0;
ss>>i;
ss<<1;
cout<<ss.str()<<endl;
return 0;
}
Thanks in advance.