That was my first thought, too. But when I print the value of the string:
1 2 3
getline ( cin, s );
cout << s << endl;
The value for s is "".
Also, before last night, inserting a "fake" getline() statement before the real one.:
1 2 3 4 5 6 7
string throwaway;
getline( cin, throwaway ); /* Since the first getline() call is not working for some reason,
here is a throwaway statement to keep the error from
effecting the program */
string s;
getline( cin, s ); // The "real" getline() statement
got me around what was happening (Obviously, this did not cure the root cause). But last night, in one instance of the above code, the program started skipping over both getlines(). At that point, I realized it is time to figure out the root cause.
I wish I read that post two hours ago. This is a much simpler solution then what I came up with. :-) Nonetheless, I'm glad I will know it moving forward. Thanks.