fork download
  1.  
  2. #include <iostream>
  3.  
  4. int main()
  5. {
  6. int count = 0 ;
  7. std::cout << "postfix\n";
  8. std::cout << count++ << '\n'; // postfix increment
  9. std::cout << count << '\n';
  10.  
  11. count = 0 ;
  12. std::cout << "prefix\n";
  13. std::cout << ++count << '\n'; // prefix inrement
  14. std::cout << count << '\n';
  15. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
postfix
0
1
prefix
1
1