1
NEED RESPONSE ASAP: C++ Question
MichelleA8 (0)

I have to get a string with a name so I used the get line() function. This is stores in a member of a structure. I have the line as:
getline(cin, s.Name);
But it just skips it and goes to the next line. How do I fix it?

You are viewing a single comment. View All
1
SPQR (331)

This might not solve your problem, but so you know you shouldn't mix getline(cin, variable) and cin >> variable. That's a pretty common mistake people make.