fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // Type your code here, or load an example.
  6. int = num;
  7. num = 2;
  8. return num * num;
  9.  
  10. return 0;
  11. }
Compilation error #stdin compilation error #stdout 0s 4536KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:6:6: error: expected unqualified-id before ‘=’ token
  int = num;
      ^
prog.cpp:7:2: error: ‘num’ was not declared in this scope
  num = 2;
  ^~~
prog.cpp:7:2: note: suggested alternative: ‘enum’
  num = 2;
  ^~~
  enum
stdout
Standard output is empty