Record Detail

Compile Error

/in/shortestP2P.cc: In member function 'void ShortestP2P::readGraph()':
/in/shortestP2P.cc:11:20: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
             array[i][j] = (i == j) ? 0 : INF;
                    ^
/in/shortestP2P.cc:18:14: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   array[start][end] = weight;
              ^
/in/shortestP2P.cc: In member function 'void ShortestP2P::distance(unsigned int, unsigned int)':
/in/shortestP2P.cc:27:13: error: invalid types '<unresolved overloaded function type>[unsigned int]' for array subscript
  if (array[A][B] == INF)
             ^
/in/shortestP2P.cc:30:18: error: invalid types '<unresolved overloaded function type>[unsigned int]' for array subscript
   cout << array[A][B] << endl;
                  ^
/in/shortestP2P.cc: In member function 'void ShortestP2P::valid()':
/in/shortestP2P.cc:42:16: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
     if (array[k][j] != INF && array[i][k] != INF)
                ^
/in/shortestP2P.cc:42:38: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
     if (array[k][j] != INF && array[i][k] != INF)
                                      ^
/in/shortestP2P.cc:44:17: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
      if (array[i][j] > (array[i][k] + array[k][j]))
                 ^
/in/shortestP2P.cc:44:32: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
      if (array[i][j] > (array[i][k] + array[k][j]))
                                ^
/in/shortestP2P.cc:44:46: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
      if (array[i][j] > (array[i][k] + array[k][j]))
                                              ^
/in/shortestP2P.cc:46:14: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
       array[i][j] = array[i][k] + array[k][j];
              ^
/in/shortestP2P.cc:46:28: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
       array[i][j] = array[i][k] + array[k][j];
                            ^
/in/shortestP2P.cc:46:42: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
       array[i][j] = array[i][k] + array[k][j];
                                          ^
/in/shortestP2P.cc:52:15: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
    if (array[m][m] < 0)
               ^

Information

Submit By
Type
Submission
Homework
Project 4
Language
C++
Submit At
2021-12-11 21:52:00
Judged At
2021-12-11 21:52:00
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes