Please post the entire program. There is probably some other stdin operation that you didn't post. We can only guess as to what the problem is but it sounds like it is one of those asked and answered about a million times questions. The below example is using cin but you get the same problem if you use cin for an integral value followed by getline for a string. There are certain types of input operations that leave a '\n' in the input stream which causes the next getline to read a blank line.

http://www.parashift.com/c++-faq-lit....html#faq-15.6