the program run perfect when the program use the data from the coding.
but when i try to import from txt file he make a problems.
the code of the import from txt is working
i got message error
Unhandled exception at 0x014621fa in Tanks.exe: 0xC0000005: Access violation reading location 0xfeeefeee.
and it point to line
void Graph::addEdge(int u, int v) {
A[u-1][v-1] =1;
THIS LINE-> A[v-1][u-1] = 1;
}
the fun get 1 and 2.
really dont know why the problem
reply to Sergey-
yeah ofcourse its just comment that i added here.
did few times debug and same error.
if i put data in my code like
g.addEdge(1, 2); g.addEdge(1, 3);
g.addEdge(2, 3); g.addEdge(2, 4);
g.addEdge(3, 4); g.addEdge(4 ,5);
it works perfect. but when i add g.addedge between the lines of import from txt and show the problem.