Re: Using getline with cin
You probably are doing a "cin >> somevariable" before that, which
leaves the new-line character in the stream buffer.
See : http://www.codeguru.com/forum/showthread.php?t=439902
Re: Using getline with cin
Usually this happens because there's already a \n in the stream from a previous cin >>.
Re: Using getline with cin
Also, it needs to be said: there's no such header as iostream.h in the C++ standard library. The correct header is iostream, no extension.
Re: Using getline with cin
The problem was the extra \n from a previous cin. It's working now. Thanks!