fork download
  1. int main()
  2. {
  3. // 1
  4. int& x1[5];
  5.  
  6. // 2
  7. int * x2;
  8.  
  9. // 3
  10. int *x3, *x4;
  11. auto dx = x3 - x4;
  12.  
  13. // 4
  14. int *x5 = x3*5;
  15.  
  16. // 5
  17. auto x6 = x3 + x4;
  18.  
  19. // 6
  20. int& z;
  21.  
  22. // 7
  23. auto y = &z;
  24. }
  25.  
  26.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:4:14: error: declaration of 'x1' as array of references
     int& x1[5];
              ^
prog.cpp:14:18: error: invalid operands of types 'int*' and 'int' to binary 'operator*'
     int *x5 = x3*5;
                  ^
prog.cpp:17:20: error: invalid operands of types 'int*' and 'int*' to binary 'operator+'
     auto x6 = x3 + x4;
                    ^
prog.cpp:20:10: error: 'z' declared as reference but not initialized
     int& z;
          ^
stdout
Standard output is empty