Re: 10008 - What's Cryptanalysis?
Posted: Sat Aug 01, 2009 3:34 pm
I have a concrete question regarding C++ language:
For example, in this problem, we type n before all, and then n lines are followed.
Why if I use getline(cin,s) function, I can only type 2 lines rather than 3?
I had to put a cin.ignore() before this in order to fix it and got A after it.
Thx in advance for the response(s).
For example, in this problem, we type n before all, and then n lines are followed.
Why if I use getline(cin,s) function, I can only type 2 lines rather than 3?
Code: Select all
for(int j = 0; j < n; ++j){
string s;
getline(cin,s);
...
Thx in advance for the response(s).