My problem sounds like this: I have as a input a huge string with numbers separated by whitespaces. I need to split this string and put the components in a vector and then to use its components. (then to transform to integers bla bla...).
I searched here for this but I did not understand some things entirely, so please a bit of explanation.
Also another question: why the following return one more "Substring: " in the end?
int main()
{
    string s("10 20 30 50 2000");
    istringstream iss(s);
    while (iss)
    {
        string sub;
        iss >> sub;
        cout << "Substring: " << sub << endl;
    }
    system("pause");
    return 0;
}
 
     
     
     
    