getline problem

when im using getline function (to input a string with spaces) with a for loop till 5 for example it only inputs 4 strings, why is that?
its hard to understand what your asking here, could you please post the source code?
1
2
3
4
5
string s;
for (int i=0;i<2;i++)
{
        getline(cin,s);
}



it only reads one string, why is that?
Topic archived. No new replies allowed.