Monthly Archives: October 2011

++x vs. x++ and saying what you mean

What’s the same Whether we pre-increment (++x) or post-increment (x++), we are adding one to the value of the variable (x += 1). int x = 5; ++x; std::cout << x << std::endl; // prints “6″ x++; std::cout << x … Continue reading

Posted in C++ | Tagged , , , , | Leave a comment