Record Detail

Compile Error

/in/shortestP2P.cc:2:6: error: 'ShortestP2P' has not been declared
 void ShortestP2P::readGraph(){
      ^~~~~~~~~~~
/in/shortestP2P.cc: In function 'void readGraph()':
/in/shortestP2P.cc:3:2: error: 'cin' was not declared in this scope
  cin >> num_node;
  ^~~
/in/shortestP2P.cc:3:9: error: 'num_node' was not declared in this scope
  cin >> num_node;
         ^~~~~~~~
/in/shortestP2P.cc:4:15: error: 'num_edge' was not declared in this scope
        cin >> num_edge;
               ^~~~~~~~
/in/shortestP2P.cc:5:8: error: 'adj_list' was not declared in this scope
        adj_list.resize(num_node);
        ^~~~~~~~
/in/shortestP2P.cc:13:9: error: 'Edge' was not declared in this scope
         Edge temp = Edge(des, dis);
         ^~~~
/in/shortestP2P.cc:14:33: error: 'temp' was not declared in this scope
         adj_list[src].push_back(temp);
                                 ^~~~
/in/shortestP2P.cc: At global scope:
/in/shortestP2P.cc:19:6: error: 'ShortestP2P' has not been declared
 void ShortestP2P::distance(unsigned int A, unsigned int B){
      ^~~~~~~~~~~
/in/shortestP2P.cc: In function 'void distance(unsigned int, unsigned int)':
/in/shortestP2P.cc:20:2: error: 'list' was not declared in this scope
  list<unsigned int> node_to_visit;
  ^~~~
/in/shortestP2P.cc:20:2: note: suggested alternative: 'int'
  list<unsigned int> node_to_visit;
  ^~~~
  int
/in/shortestP2P.cc:20:7: error: expected primary-expression before 'unsigned'
  list<unsigned int> node_to_visit;
       ^~~~~~~~
/in/shortestP2P.cc:21:8: error: 'vector' was not declared in this scope
        vector<int> dis_curr;
        ^~~~~~
/in/shortestP2P.cc:21:15: error: expected primary-expression before 'int'
        vector<int> dis_curr;
               ^~~
/in/shortestP2P.cc:22:15: error: expected primary-expression before 'int'
        vector<int> visit_time;
               ^~~
/in/shortestP2P.cc:23:8: error: 'dis_curr' was not declared in this scope
        dis_curr.resize(num_node);
        ^~~~~~~~
/in/shortestP2P.cc:23:24: error: 'num_node' was not declared in this scope
        dis_curr.resize(num_node);
                        ^~~~~~~~
/in/shortestP2P.cc:25:14: error: 'INF' was not declared in this scope
         *i = INF;
              ^~~
/in/shortestP2P.cc:27:8: error: 'visit_time' was not declared in this scope
        visit_time.resize(num_node);
        ^~~~~~~~~~
/in/shortestP2P.cc:31:8: error: 'node_to_visit' was not declared in this scope
        node_to_visit.push_back(A);
        ^~~~~~~~~~~~~
/in/shortestP2P.cc:37:10: error: 'cout' was not declared in this scope
          cout<< "Invalid graph. Exiting."<<endl;
          ^~~~
/in/shortestP2P.cc:37:44: error: 'endl' was not declared in this scope
          cout<< "Invalid graph. Exiting."<<endl;
                                            ^~~~
/in/shortestP2P.cc:37:44: note: suggested alternative: 'enum'
          cout<< "Invalid graph. Exiting."<<endl;
                                            ^~~~
                                            enum
/in/shortestP2P.cc:40:16: error: 'Edge' was not declared in this scope
         vector<Edge> vec_temp = adj_list[curr_node];
                ^~~~
/in/shortestP2P.cc:40:22: error: 'vec_temp' was not declared in this scope
         vector<Edge> vec_temp = adj_list[curr_node];
                      ^~~~~~~~
/in/shortestP2P.cc:40:33: error: 'adj_list' was not declared in this scope
         vector<Edge> vec_temp = adj_list[curr_node];
                                 ^~~~~~~~
/in/shortestP2P.cc:42:15: error: expected ';' before 'edge_curr'
          Edge edge_curr = *it;
               ^~~~~~~~~
/in/shortestP2P.cc:43:34: error: 'edge_curr' was not declared in this scope
          unsigned int des_curr = edge_curr.des;
                                  ^~~~~~~~~
/in/shortestP2P.cc:43:34: note: suggested alternative: 'des_curr'
          unsigned int des_curr = edge_curr.des;
                                  ^~~~~~~~~
                                  des_curr
/in/shortestP2P.cc:66:21: error: 'INF' was not declared in this scope
        if(result == INF) cout<<"INF"<<endl;
                     ^~~
/in/shortestP2P.cc:66:26: error: 'cout' was not declared in this scope
        if(result == INF) cout<<"INF"<<endl;
                          ^~~~
/in/shortestP2P.cc:66:39: error: 'endl' was not declared in this scope
        if(result == INF) cout<<"INF"<<endl;
                                       ^~~~
/in/shortestP2P.cc:66:39: note: suggested alternative: 'enum'
        if(result == INF) cout<<"INF"<<endl;
                                       ^~~~
                                       enum
/in/shortestP2P.cc:67:13: error: 'cout' was not declared in this scope
        else cout<<result<<endl;
             ^~~~
/in/shortestP2P.cc:67:27: error: 'endl' was not declared in this scope
        else cout<<result<<endl;
                           ^~~~
/in/shortestP2P.cc:67:27: note: suggested alternative: 'enum'
        else cout<<result<<endl;
                           ^~~~
                           enum

Information

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