fork download
  1. #include <iostream>
  2. #include <limits>
  3.  
  4. int main ()
  5. {
  6. int x = 2;
  7. std::cout << "x: " << x++ << std::endl;
  8. std::cout << "x: " << x << std::endl;
  9. std::cout << "x: " << ++x << std::endl;
  10.  
  11. std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
  12. }
  13.  
Success #stdin #stdout 0s 3344KB
stdin
Standard input is empty
stdout
x: 2
x: 3
x: 4