Question: C++ Program Error (Graph Problem): I am getting an error claiming that a vector I need to use for my program is out of scope.
C++ Program Error (Graph Problem):
I am getting an error claiming that a vector I need to use for my program is out of scope.
Here is the error message:

The verticies vector is declaired as a private method (I assume the error has something to do with this).
Here is my code for the assignDistricts() method and verticies vector:


Does anyone know what the problem is?
Graph.cpp: In function void assignDistricts()': Graph.cpp:99:22: error. vertices, was not declared in this scope for(int = 0 ;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
