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:
But it just skips it and goes to the next line. How do I fix it?
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.