#include <iostream>using namespacestd;intMain () {intI=0, j=0; cout<<i++<<"\ t"<<i++<<"\ t"; cout<<i++<<Endl; printf ("j++\tj++\t"); printf ("j++\n"); return 0;}
VC6.0
#include <iostream>using namespacestd;inthello1 ();intHello2 ();intMain () {intA, B; cout<<"a="<"b="<Endl; printf ("a=%d b=%d\n", Hello1 (), Hello2 ()); return 0;}intHello1 () {cout<<"Hello1"<<Endl; return 1;}intHello2 () {cout<<"Hello2"<<Endl; return 2;}
VC6.0
The sequence of operations for the cout stream is:
Read the buffer from right to left and then output from left to right. So when it reads from the right to the left, it touches the function of course to execute the function first, and then reads the function return value into the buffer and then ... is the output from the left.
Looks like the compiler has different results, so you need to standardize your own input and output
cout and printf