hey whats up..i hate getlines..we're working in UNIX on a binary file program..
and i need to ask for a persons name...and i tried to ways..
way 1)
Code:
string key;
cout << "Enter name\n"; //input: Michael Jordan
getline(cin, key, '\n');
cout << key << endl; //output: it skips over this, doesn't halt at the getline to get the value...rather just moves right along w/ the function and the key being some crazy value
way 2)
i just inserted a cin.ignore to see what would happen..and it halts, but still pulls out a " " instead of "Michael Jordan", does anyone know what i'm doing wrong?
Thanks!
BBNERD!