Need help with gets() [C]

[b][red]This message was edited by pyrokinesis at 2003-2-12 13:7:41[/red][/b][hr]
For some reason when I was using gets() in the main function of one program, it worked fine. It was also the first input of the program.

I decided then to take that bit of code and work it into a data validation function of another program I was writing, where it isn't the first input and now it skips over the gets()!

Any ideas on why this is going on, or what I can do to fix it?


  • Never mind. flushall() wasn't working for some reason, so I tried fflush(stdin) and it works. Yay.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion