An "Out of Range" Problem with Vectors in C++
Hello everyone! Here is the description of my problem:
The Program's Description:
I am implementing a program in C++ that tests Prim's algorithm for finding minimum spanning trees. The objective of the program is calculating the number of seconds it takes to find the minimum spanning tree for a selected number of random graphs.
What i have done up to now?
I finished the implementation of the functions and the header files for the whole program. Since the source code is small, i decided for clarity reasons to attach it with this mail in order to provide a better visualization of the problem.
For some reason, i have facing some sort of "out of range" vector problem during the run time of the application.
The problem is rising specifically in the lines of: 123 & 126 of the ("Prim_and_Kruskal_Algorithms.cpp") file.
The Nature of the Current Source Code:
I would be really grateful if anyone can help me spotting the problem. I have attached the source code with this question.
Thanks in advance for your help,
|All times are GMT +5.5. The time now is 17:32.|