Record Detail

Compile Error

/in/game.cpp:34:34: error: empty character constant
             newGame->grid[i][j] ='';
                                  ^~
/in/game.cpp:60:32: error: empty character constant
         if (game->grid[r][c] =='') {
                                ^~
/in/game.cpp:80:32: error: empty character constant
         if (game->grid[r][c] =='') {
                                ^~
/in/game.cpp:102:32: error: empty character constant
         if (game->grid[r][c] =='' &&!IsPacmanExists(game)) {
                                ^~
/in/game.cpp:180:43: error: empty character constant
         game->grid[pacmanRow][pacmanCol] ='';
                                           ^~
/in/game.cpp:199:32: error: empty character constant
         if (game->grid[r][c] =='' || game->grid[r][c] == '.') {
                                ^~
/in/game.cpp:294:43: error: empty character constant
                         game->grid[i][j] ='';
                                           ^~
/in/game.cpp:321:47: error: empty character constant
                             game->grid[i][j] ='';
                                               ^~
/in/game.cpp:378:32: error: empty character constant
         if (game->grid[r][c] =='' || game->grid[r][c] == '.') {
                                ^~
/in/game.cpp:389:43: error: empty character constant
         game->grid[pacmanRow][pacmanCol] ='';
                                           ^~
/in/game.cpp:396:43: error: empty character constant
         game->grid[pacmanRow][pacmanCol] ='';
                                           ^~
In file included from /in/game.cpp:5:0:
/in/lab6.h:45:10: error: 'vector' in namespace 'std' does not name a template type
     std::vector<Ghost> ghosts;
          ^~~~~~
/in/lab6.h:46:10: error: 'vector' in namespace 'std' does not name a template type
     std::vector<std::pair<int, int>> scaredGhosts;
          ^~~~~~
/in/lab6.h:62:1: error: expected initializer before 'bool'
 bool AddGhost(Game *game, int r, int c, Direction direction);
 ^~~~
/in/lab6.h:66:1: error: expected initializer before 'Direction'
 Direction GetScaredGhostDirection(Game *game, int row, int col)
 ^~~~~~~~~
/in/game.cpp: In function 'Game* NewGame(int, int)':
/in/game.cpp:25:22: error: 'ONGOING' was not declared in this scope
     newGame->state = ONGOING;
                      ^~~~~~~
/in/game.cpp: In function 'bool AddPacman(Game*, int, int)':
/in/game.cpp:102:38: error: 'IsPacmanExists' was not declared in this scope
         if (game->grid[r][c] =='' &&!IsPacmanExists(game)) {
                                      ^~~~~~~~~~~~~~
/in/game.cpp: In function 'Direction GetGhostInitialDirection(Game*, int, int)':
/in/game.cpp:220:18: error: 'Game {aka struct game}' has no member named 'ghosts'
     return game->ghosts[row][col].initialDirection;
                  ^~~~~~
/in/game.cpp: In function 'Direction GetScaredGhostDirection(Game*, int, int)':
/in/game.cpp:224:37: error: 'time' was not declared in this scope
     srand(static_cast<unsigned int>(time(nullptr)));
                                     ^~~~
/in/game.cpp:224:37: note: suggested alternative: 'game'
     srand(static_cast<unsigned int>(time(nullptr)));
                                     ^~~~
                                     game
/in/game.cpp:237:43: error: a function-definition is not allowed here before '{' token
 Direction ReverseDirection(Direction dir) {
                                           ^
/in/game.cpp:432:1: error: a function-definition is not allowed here before '{' token
 {
 ^
/in/game.cpp:438:1: error: expected '}' at end of input
 }
 ^
In file included from /in/compile/io.h:5:0,
                 from /in/compile/io.cpp:7:
/in/compile/../lab6.h:45:10: error: 'vector' in namespace 'std' does not name a template type
     std::vector<Ghost> ghosts;
          ^~~~~~
/in/compile/../lab6.h:46:10: error: 'vector' in namespace 'std' does not name a template type
     std::vector<std::pair<int, int>> scaredGhosts;
          ^~~~~~
/in/compile/../lab6.h:62:1: error: expected initializer before 'bool'
 bool AddGhost(Game *game, int r, int c, Direction direction);
 ^~~~
/in/compile/../lab6.h:66:1: error: expected initializer before 'Direction'
 Direction GetScaredGhostDirection(Game *game, int row, int col)
 ^~~~~~~~~
/in/compile/io.cpp: In function 'void PlayGame(Game*)':
/in/compile/io.cpp:127:5: error: 'EndGame' was not declared in this scope
     EndGame(game);
     ^~~~~~~
/in/compile/io.cpp:127:5: note: suggested alternative: 'NewGame'
     EndGame(game);
     ^~~~~~~
     NewGame
In file included from /in/compile/io.h:5:0,
                 from /in/compile/map.h:1,
                 from /in/compile/map.cpp:1:
/in/compile/../lab6.h:45:10: error: 'vector' in namespace 'std' does not name a template type
     std::vector<Ghost> ghosts;
          ^~~~~~
/in/compile/../lab6.h:46:10: error: 'vector' in namespace 'std' does not name a template type
     std::vector<std::pair<int, int>> scaredGhosts;
          ^~~~~~
/in/compile/../lab6.h:62:1: error: expected initializer before 'bool'
 bool AddGhost(Game *game, int r, int c, Direction direction);
 ^~~~
/in/compile/../lab6.h:66:1: error: expected initializer before 'Direction'
 Direction GetScaredGhostDirection(Game *game, int row, int col)
 ^~~~~~~~~
/in/compile/map.cpp: In function 'void map3(Game*)':
/in/compile/map.cpp:58:2: error: 'AddGhost' was not declared in this scope
  AddGhost(game, 2, 3, right), AddGhost(game, 4, 5, down);
  ^~~~~~~~
/in/compile/map.cpp:58:2: note: suggested alternative: 'Ghost'
  AddGhost(game, 2, 3, right), AddGhost(game, 4, 5, down);
  ^~~~~~~~
  Ghost
/in/compile/map.cpp: In function 'void map4(Game*)':
/in/compile/map.cpp:67:2: error: 'AddGhost' was not declared in this scope
  AddGhost(game, 0, 1, right);
  ^~~~~~~~
/in/compile/map.cpp:67:2: note: suggested alternative: 'Ghost'
  AddGhost(game, 0, 1, right);
  ^~~~~~~~
  Ghost
/in/compile/map.cpp: In function 'void map5(Game*)':
/in/compile/map.cpp:87:2: error: 'AddGhost' was not declared in this scope
  AddGhost(game, 2, 3, down), AddGhost(game, 4, 5, right);
  ^~~~~~~~
/in/compile/map.cpp:87:2: note: suggested alternative: 'Ghost'
  AddGhost(game, 2, 3, down), AddGhost(game, 4, 5, right);
  ^~~~~~~~
  Ghost
/in/compile/map.cpp: In function 'void map6(Game*)':
/in/compile/map.cpp:103:2: error: 'AddGhost' was not declared in this scope
  AddGhost(game, 2, 3, down), AddGhost(game, 4, 5, right);
  ^~~~~~~~
/in/compile/map.cpp:103:2: note: suggested alternative: 'Ghost'
  AddGhost(game, 2, 3, down), AddGhost(game, 4, 5, right);
  ^~~~~~~~
  Ghost
/in/compile/map.cpp: In function 'void map7(Game*)':
/in/compile/map.cpp:118:2: error: 'AddGhost' was not declared in this scope
  AddGhost(game, 2, 3, down), AddGhost(game, 4, 5, right);
  ^~~~~~~~
/in/compile/map.cpp:118:2: note: suggested alternative: 'Ghost'
  AddGhost(game, 2, 3, down), AddGhost(game, 4, 5, right);
  ^~~~~~~~
  Ghost
/in/compile/map.cpp: In function 'void map8(Game*)':
/in/compile/map.cpp:128:2: error: 'AddGhost' was not declared in this scope
  AddGhost(game, 0, 2, right), AddGhost(game, 0, 4, down), AddGhost(game, 1, 2, right), AddGhost(game, 2, 0, down), AddGhost(game, 3, 3, down), AddGhost(game, 4, 1, right), AddGhost(game, 4, 4, right);
  ^~~~~~~~
/in/compile/map.cpp:128:2: note: suggested alternative: 'Ghost'
  AddGhost(game, 0, 2, right), AddGhost(game, 0, 4, down), AddGhost(game, 1, 2, right), AddGhost(game, 2, 0, down), AddGhost(game, 3, 3, down), AddGhost(game, 4, 1, right), AddGhost(game, 4, 4, right);
  ^~~~~~~~
  Ghost
/in/compile/map.cpp: In function 'void map9(Game*)':
/in/compile/map.cpp:155:2: error: 'AddGhost' was not declared in this scope
  AddGhost(game, 0, 0, right), AddGhost(game, 14, 14, left), AddGhost(game, 0, 14, down), AddGhost(game, 14, 0, up);
  ^~~~~~~~
/in/compile/map.cpp:155:2: note: suggested alternative: 'Ghost'
  AddGhost(game, 0, 0, right), AddGhost(game, 14, 14, left), AddGhost(game, 0, 14, down), AddGhost(game, 14, 0, up);
  ^~~~~~~~
  Ghost
/in/compile/map.cpp: In function 'void map10(Game*)':
/in/compile/map.cpp:183:2: error: 'AddGhost' was not declared in this scope
  AddGhost(game, 0, 0, right), AddGhost(game, 14, 14, left), AddGhost(game, 0, 14, down), AddGhost(game, 14, 0, up);
  ^~~~~~~~
/in/compile/map.cpp:183:2: note: suggested alternative: 'Ghost'
  AddGhost(game, 0, 0, right), AddGhost(game, 14, 14, left), AddGhost(game, 0, 14, down), AddGhost(game, 14, 0, up);
  ^~~~~~~~
  Ghost
In file included from /in/compile/io.h:5:0,
                 from /in/compile/map.h:1,
                 from /in/compile/main.cpp:1:
/in/compile/../lab6.h:45:10: error: 'vector' in namespace 'std' does not name a template type
     std::vector<Ghost> ghosts;
          ^~~~~~
/in/compile/../lab6.h:46:10: error: 'vector' in namespace 'std' does not name a template type
     std::vector<std::pair<int, int>> scaredGhosts;
          ^~~~~~
/in/compile/../lab6.h:62:1: error: expected initializer before 'bool'
 bool AddGhost(Game *game, int r, int c, Direction direction);
 ^~~~
/in/compile/../lab6.h:66:1: error: expected initializer before 'Direction'
 Direction GetScaredGhostDirection(Game *game, int row, int col)
 ^~~~~~~~~

Information

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