fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6. short j;
  7. for(int i = 0; i < 20; ++i++){
  8. j = i/2;
  9. count << "i:" << String(i) << "\tj:" << String(j) << endl;
  10. }
  11. return 0;
  12. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:7:28: error: lvalue required as increment operand
  for(int i = 0; i < 20; ++i++){
                            ^
prog.cpp:9:3: error: 'count' was not declared in this scope
   count << "i:" << String(i) << "\tj:" << String(j) << endl;
   ^
prog.cpp:9:28: error: 'String' was not declared in this scope
   count << "i:" << String(i) << "\tj:" << String(j) << endl;
                            ^
stdout
Standard output is empty