fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. while (false)
  6. {
  7. int i = 3;
  8. }
  9. i = 2; //no, this will not work
  10. return 0;
  11. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:7:7: warning: unused variable ‘i’ [-Wunused-variable]
   int i = 3;
       ^
prog.cpp:9:2: error: ‘i’ was not declared in this scope
  i = 2; //no, this will not work
  ^
stdout
Standard output is empty