- Joined
- Apr 23, 2011
- Messages
- 1
- Reaction score
- 0
Hello,
I'm currently working on programming Dijkstra's shortest path algorithm. For the program, I read a series of vertexes and edge weights from a text file, and then return the shortest path to each vertex. I have a solid understanding of how the algorithm works, but I've run into a technical problem. I am looking to convert the string that I parse from the text file, (e.g. "v1") into a vertex object with the name v1.
I attempted to code:
vertex vertexList[0] = new vertex --- where vertexList[] is an array of strings with the names of the vertexes that I parse from the text file.
Any assistance would be greatly appreciated!
I'm currently working on programming Dijkstra's shortest path algorithm. For the program, I read a series of vertexes and edge weights from a text file, and then return the shortest path to each vertex. I have a solid understanding of how the algorithm works, but I've run into a technical problem. I am looking to convert the string that I parse from the text file, (e.g. "v1") into a vertex object with the name v1.
I attempted to code:
vertex vertexList[0] = new vertex --- where vertexList[] is an array of strings with the names of the vertexes that I parse from the text file.
Any assistance would be greatly appreciated!