Record Detail

Compile Error

/in/game.cpp: In function 'Game* NewGame(int, int)':
/in/game.cpp:27:11: error: 'Game {aka struct game}' has no member named 'pacmanRow'
     game->pacmanRow = -1;
           ^~~~~~~~~
/in/game.cpp:28:11: error: 'Game {aka struct game}' has no member named 'pacmanCol'
     game->pacmanCol = -1;
           ^~~~~~~~~
/in/game.cpp: In function 'bool AddPacman(Game*, int, int)':
/in/game.cpp:97:15: error: 'Game {aka struct game}' has no member named 'pacmanRow'
     if (game->pacmanRow != -1 && game->pacmanCol != -1) {
               ^~~~~~~~~
/in/game.cpp:97:40: error: 'Game {aka struct game}' has no member named 'pacmanCol'
     if (game->pacmanRow != -1 && game->pacmanCol != -1) {
                                        ^~~~~~~~~
/in/game.cpp:102:11: error: 'Game {aka struct game}' has no member named 'pacmanRow'
     game->pacmanRow = r;      // 更新 Pacman 的行
           ^~~~~~~~~
/in/game.cpp:103:11: error: 'Game {aka struct game}' has no member named 'pacmanCol'
     game->pacmanCol = c;      // 更新 Pacman 的列
           ^~~~~~~~~
/in/game.cpp: In function 'void MovePacman(Game*, Direction)':
/in/game.cpp:126:20: error: 'Game {aka struct game}' has no member named 'pacmanRow'
     int pr = game->pacmanRow, pc = game->pacmanCol;
                    ^~~~~~~~~
/in/game.cpp:129:23: error: 'pc' was not declared in this scope
     int nr = pr, nc = pc;
                       ^~
/in/game.cpp:129:23: note: suggested alternative: 'nc'
     int nr = pr, nc = pc;
                       ^~
                       nc
/in/game.cpp:150:15: error: 'Game {aka struct game}' has no member named 'pacmanRow'
         game->pacmanRow = nr;
               ^~~~~~~~~
/in/game.cpp:151:15: error: 'Game {aka struct game}' has no member named 'pacmanCol'
         game->pacmanCol = nc;
               ^~~~~~~~~

Information

Submit By
Type
Submission
Homework
Lab 6: Pacman
Language
C++
Submit At
2024-12-09 21:49:12
Judged At
2024-12-09 21:49:12
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes