I have placed som information to stringstream ss:
stringstream ss (stringstream::in | stringstream::out);
ss<<"abc 456 ";
ss<<123
Then I decided to retrieve string content to string g:
std::string s;
std::string g;
for (int n=0; n<c; n++)
{
ss >> s;
g=g+s;
}
cout << g <<endl;
For this reason I need to know how many placements was done to ss. How to know that? Probably method that retrieves string information is not very clever – then give your way.
You’ll need to count this yourself, stringstream provides no ability to count how many insertions were done to it.
How about:
To get the full string with everything thats been inserted into it.