Home › Forums › C Programming › standard I/O › Reply To: standard I/O
May 20, 2008 at 5:42 pm
#3392
Humayan
Participant
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…