- This topic has 1 reply, 2 voices, and was last updated 16 years, 7 months ago by .
Viewing 1 reply thread
Viewing 1 reply thread
- The forum ‘C Programming’ is closed to new topics and replies.
Home › Forums › C Programming › standard I/O
how do i jump to the next line after a particular character is found from a standard input. this should evade all the remaining characters in that line after that particular character.
Im actually looking for a way to jump to the next line.
Please help/
What I would do is read in all characters until newline when I found the appropriate character:
char ch;
…..
1 2 3 4 5 6 | if ( ch == characterYourLookingFor )<br /> {<br /> cin >> ch;<br /> while ( ch != 'n' )<br /> cin >> ch;<br /> } |
// the next character you read will be from the front of the next line…