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