fork download
  1. void draw()
  2. {
  3. int i,j;
  4. cout<<endl;
  5. for(int k=0;k<8;++k)
  6. cout<<" -";
  7. for(i=0;i<8;++i)
  8. {
  9. cout<<endl;
  10. for(j=0;j<8;++j)
  11. {
  12. cout<<"|";
  13. if(board[i][j]==2)
  14. cout<<'Q';
  15. else
  16. cout<<" ";
  17.  
  18. }
  19. cout<<"|"<<endl;
  20. for(int k=0;k<8;++k)
  21. cout<<" -";
  22.  
  23. }
  24. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘void draw()’:
prog.cpp:4:5: error: ‘cout’ was not declared in this scope
     cout<<endl;
     ^
prog.cpp:4:11: error: ‘endl’ was not declared in this scope
     cout<<endl;
           ^
prog.cpp:13:16: error: ‘board’ was not declared in this scope
             if(board[i][j]==2)
                ^
stdout
Standard output is empty