fork download
  1. for (int i = 0; i < Width; i++) {
  2. for (int j = 0; j < Height; i++) {
  3. if (myArray[i][j] == 0) {
  4. glColor(1.1, 1.1, 1.1);
  5. } else {
  6. glColor(2.2, 2.2, 2.2);
  7. }
  8.  
  9. glBegin(GL_QUADS);
  10. glVertex2f(-0.2, 0.2);
  11. glVertex2f(0.2, 0.2);
  12. glVertex2f(0.2, 0.2);
  13. glVertex2f(-0.2, 0.2);
  14. glEnd;
  15. }
  16. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:1: error: expected unqualified-id before ‘for’
 for (int i = 0; i < Width; i++) {
 ^
prog.cpp:1:17: error: ‘i’ does not name a type
 for (int i = 0; i < Width; i++) {
                 ^
prog.cpp:1:28: error: ‘i’ does not name a type
 for (int i = 0; i < Width; i++) {
                            ^
stdout
Standard output is empty