fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. #define DEBUG(x) \
  5. cerr << "In " << __FILE__ << " at " << __LINE__ << ' ' << #x << " = " << x << endl;
  6.  
  7. int main() {
  8. // your code goes here
  9. int i = 0;
  10. DEBUG(i);
  11. ++i; DEBUG(i);
  12. return 0;
  13. }
Success #stdin #stdout #stderr 0s 3456KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
In prog.cpp at 10 i = 0
In prog.cpp at 11 i = 1