This example reads lines with an integer, an operator, and another integer. For instance,
25 * 3
4/2
// sstream-line-input.cpp - Example of input string stream. // This accepts only lines with an int, a char, and an int. // Fred Swartz 11 Aug 2003
operator>> Return the object itself (* this).
How does the test if (instream >> a >> op >> b) ?
I think the test is always true because instream!=NULL .
source share