I am working in C++ (not C++/CLI) in Visual Studio 2012.
I don\'t understand why this code works, I would have expected it to fail
The comma operator is a 'sequence point' in C++, often used to initialise multiple variables in for loops.
So the code is evaluating a series of integers, one at a time, as single expressions. The last of these is the returned value, and the return statement as a whole is equivalent to simply return (40);