Problem adjmatrix
User shaokai347
Submission Time 2026-02-05 18:02:34
Score 0
Max Time N/A
Max Memory N/A

Compile Error

adjmatrix.cpp:24:2: error: expected ‘;’ after class definition
24 | }
| ^
| ;
adjmatrix.cpp: In function ‘int main()’:
adjmatrix.cpp:29:11: error: ‘Graph::Graph(long long int)’ is private within this context
29 | Graph g(n);
| ^
adjmatrix.cpp:6:2: note: declared private here
6 | Graph(long long numVertices){
| ^~~~~
adjmatrix.cpp:32:3: error: ‘addVertex’ was not declared in this scope
32 | addVertex(a, b);
| ^~~~~~~~~
adjmatrix.cpp:34:4: error: invalid use of non-static member function ‘void Graph::toString()’
34 | g.toString;
| ~~^~~~~~~~
adjmatrix.cpp:16:7: note: declared here
16 | void toString(){
| ^~~~~~~~