fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. volatile int x = 1;
  8.  
  9. switch (x)
  10. {
  11. case 1: break;
  12. case 1: break;
  13. }
  14.  
  15. return 0;
  16. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:12:5: error: duplicate case value
     case 1:   break;
     ^~~~
prog.cpp:11:5: note: previously used here
     case 1:   break;
     ^~~~
stdout
Standard output is empty