cin.getline....?????

Started by
1 comment, last by Noods 22 years, 7 months ago
Anybody know why your program would totally skip a cin.getline??? The code is cool, straight out of the book. I also print what is stored in the variable. All the correct headers are included. Nothing. I just cant find out why my cin.getline is being totally skipped when I run the program. Thanks in advance. -Noods
Advertisement
Never mind guys, I found the problem. The cin.getline wanst being accepted because I omitted the termination character. To bypass any problems, make sure you specify the termination character when using cin.getline. Thanks anyway!

-Noods

You shouldn''t have to specify the terminator if you want it to be \n. Perhaps a previous read operation had left a newline in the buffer. Also, make sure you have applied the patches at the Dinkumware STL site if you''re using VC5 or VC6.

This topic is closed to new replies.

Advertisement