Record Detail

Compile Error

In file included from /in/driver/main.cpp:1:0:
/in/shortestP2P.hpp:62:25: error: 'int ShortestP2P::distance [1000][1000]' conflicts with a previous declaration
  int distance[1000][1000];
                         ^
/in/shortestP2P.hpp:58:12: note: previous declaration 'void ShortestP2P::distance(unsigned int, unsigned int)'
       void distance(unsigned int a, unsigned int b);
            ^~~~~~~~
In file included from /in/shortestP2P.cc:1:0:
/in/shortestP2P.hpp:62:25: error: 'int ShortestP2P::distance [1000][1000]' conflicts with a previous declaration
  int distance[1000][1000];
                         ^
/in/shortestP2P.hpp:58:12: note: previous declaration 'void ShortestP2P::distance(unsigned int, unsigned int)'
       void distance(unsigned int a, unsigned int b);
            ^~~~~~~~
/in/shortestP2P.cc: In member function 'void ShortestP2P::readGraph()':
/in/shortestP2P.cc:13:13: error: 'matrix' was not declared in this scope
             matrix[index][i] = INF;
             ^~~~~~
/in/shortestP2P.cc:13:13: note: suggested alternative: 'atoi'
             matrix[index][i] = INF;
             ^~~~~~
             atoi
/in/shortestP2P.cc:22:9: error: 'matrix' was not declared in this scope
         matrix[x][y] = weight;
         ^~~~~~
/in/shortestP2P.cc:22:9: note: suggested alternative: 'atoi'
         matrix[x][y] = weight;
         ^~~~~~
         atoi
/in/shortestP2P.cc:31:21: error: 'matrix' was not declared in this scope
                 if (matrix[i][j] > matrix[i][index] + matrix[index][j] && matrix[i][index] < INF && matrix[index][j] < INF)
                     ^~~~~~
/in/shortestP2P.cc:31:21: note: suggested alternative: 'atoi'
                 if (matrix[i][j] > matrix[i][index] + matrix[index][j] && matrix[i][index] < INF && matrix[index][j] < INF)
                     ^~~~~~
                     atoi
/in/shortestP2P.cc:36:31: error: 'matrix' was not declared in this scope
                 if (i == j && matrix[i][j] < 0)
                               ^~~~~~
/in/shortestP2P.cc:36:31: note: suggested alternative: 'atoi'
                 if (i == j && matrix[i][j] < 0)
                               ^~~~~~
                               atoi
/in/shortestP2P.cc: At global scope:
/in/shortestP2P.cc:46:56: error: no 'void ShortestP2P::matrix(unsigned int, unsigned int)' member function declared in class 'ShortestP2P'
 void ShortestP2P::matrix(unsigned int a, unsigned int b)
                                                        ^

Information

Submit By
Type
Submission
Homework
Project 4
Language
C++
Submit At
2021-12-14 17:40:22
Judged At
2021-12-14 17:40:22
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes