problem with gets()
I am having a strange problem when prompting the user for input. When I try to use gets() it seems to skip over a piece of my code. For example:
cout<<"Enter your string: ";
If I used this code if would not print Enter your string. It would simply skip over it and wait for user input. I am very confused to why this is happening. If anyone has any ideas please help. Thanks
have you tried
. i think it's in <ctype.h>. but I don't know much, i'm learning myself.
strange.. i used to have the same problem while using
cin.getline(), thus i changed to gets().
maybe use : cin.ignore();