Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

detect end of user input cpp

while (cin.peek() != EOF) {
  // To do your stuff...
  // NOTE: peek() will set failbit when peeking end of stream and return EOF(-1).
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #detect #user #input #cpp
ADD COMMENT
Topic
Name
6+6 =