fork download
  1. void move()
  2. {
  3. x_rockman += x_velocity;
  4. y_rockman += y_velocity;
  5.  
  6. if(check_collision(box, wall) )
  7. {
  8. if(Left_Collision || Right_Collision)
  9. {
  10. x_rockman -= x_velocity;
  11. y_rockman -= 5;
  12. }
  13. else if(Top_Collision)
  14. {
  15. y_velocity = 10;
  16. y_rockman += y_velocity;
  17.  
  18. }
  19. else if(Bottom_Collision)
  20. {
  21. y_velocity = 0;
  22. }
  23.  
  24. }
  25.  
  26. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘void move()’:
prog.cpp:3:3: error: ‘x_rockman’ was not declared in this scope
prog.cpp:3:16: error: ‘x_velocity’ was not declared in this scope
prog.cpp:4:3: error: ‘y_rockman’ was not declared in this scope
prog.cpp:4:16: error: ‘y_velocity’ was not declared in this scope
prog.cpp:6:25: error: ‘box’ was not declared in this scope
prog.cpp:6:30: error: ‘wall’ was not declared in this scope
prog.cpp:6:34: error: ‘check_collision’ was not declared in this scope
prog.cpp:8:8: error: ‘Left_Collision’ was not declared in this scope
prog.cpp:8:26: error: ‘Right_Collision’ was not declared in this scope
prog.cpp:13:13: error: ‘Top_Collision’ was not declared in this scope
prog.cpp:19:13: error: ‘Bottom_Collision’ was not declared in this scope
stdout
Standard output is empty