Sunday, 11 August 2013

what is the difference beetwen stringstream object() and object

what is the difference beetwen stringstream object() and object

in my program i have
stringstream strumien(); //1
stringstream strumien; // 2
strumien<<"napis "<<8<<endl;
and the first line generate error
invalid operands of types 'std::stringstream() {aka
std::basic_stringstream()}' and 'const char [7]' to binary 'operator<<'
but the second one work properly. (of course always one of them is
commented out)
So what is the difference beetwen them because i always thought that they
are equal definition of object.
thank in advance

No comments:

Post a Comment