Record Detail

Compile Error

/in/game.cpp: In function 'void MoveGhosts(Game*)':
/in/game.cpp:433:25: error: 'p' was not declared in this scope
                     for(p=n;p< game->GhostCount; p++){
                         ^
/in/game.cpp:439:144: error: request for member 'grid' in 'game', which is of pointer type 'Game* {aka game*}' (maybe you meant to use '->' ?)
                 else if(game->grid[game->ghost[n].p1+1][game->ghost[n].p2]=='X'||game->grid[game->ghost[n].p1+1][game->ghost[n].p2]=='@'||game.grid[game->ghost[n].p1+1][game->ghost[n].p2]=='-'||game->grid[game->ghost[n].p1+1][game->ghost[n].p2]=='#'){
                                                                                                                                                ^~~~
/in/game.cpp:561:30: error: request for member 'grid' in 'game', which is of pointer type 'Game* {aka game*}' (maybe you meant to use '->' ?)
                         game.grid[game->ghost[n].p1][game->ghost[n].p2-1]=temp;
                              ^~~~

Information

Submit By
Type
Submission
Homework
Lab6: Pac-man
Language
C++
Submit At
2023-12-10 15:06:01
Judged At
2023-12-10 15:06:01
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes