here is a simple test program that demonstrates the evaluation order for operator<< applied to ostreams
static int n=97;
This evaluates the second nextchar() before the first and the output is "cb". The question is why?
The binding for operator << is left to right just as the '+' operator. Therefore I'd expect this to evaluate cout.operator<<(nextchar()).operator<<(nextchar()) to produce an output of "bc", but that is definitely not what happens. Stroustrup says in 21.2.2 of The C++ programming language, special or 3rd edition that the compiler would interpret my statement at
operator<<(cout,nextchar()).operator<<(nextchar()) which again seems to me will also produce "bc"