fork(1) download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int n = 0;
  8. cout << "n before: " << n << endl;
  9. n=++n;
  10. cout << "n after: " << n << endl;
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
n before: 0
n after: 1