+ 1
What does this code mean ? What is the stringstream use of and its resemblance in this code . Can anyone tell me ?
if(vec.size()!=0) { stringstream ss(vec[vec.size()-1].stocks[0]); int temp; ss>>temp; temp+=1; ss.clear(); ss<<temp; write[0] = ss.str(); }
2 Antworten
+ 1
What is the overall code supposed to do? Can you send the full code?
+ 1
stringstream is a special class that allows us to treat a string as a buffer for a stream. This is useful when you wish to convert data to/from a string and apply stream functions and manipulators at the same time.
For more info : www.cplusplus.com/reference/sstream/stringstream