fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int x = 0;
  6. int x = 0;
  7. return 0;
  8. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:6:6: error: redeclaration of ‘int x’
  int x = 0;
      ^
prog.cpp:5:6: note: ‘int x’ previously declared here
  int x = 0;
      ^
stdout
Standard output is empty