If you replace the return statement in the function named doubleIt in Listing 5 with either of the following statements, the program will still compile and run successfully using Dev C++. However, the compilation will fail using MS VS 6.0.
int y = x + x; x + x;
This illustrates some of the compatibility issues that you can expect to encounter when working with C++.
The screen output produced by the program is
a = 2 a doubled = 4