← Back to topics
Topic

Ignore <ENTER> key

W
WindListener
HELLO to everyone!
Now, here is my question:
How can I input date into my program ignoring <ENTER> key, using scanf, until EOF (End Of File)????
D
Daniel93

while( scanf( "%c", &c ) != EOF ){

if( c == '\n' )continue;
// itd........
}

I guess that is what you asking for, if not then give an example.