Question: Write a C++program called adjacenyMatrix.cpp that converts a directed graph stored in an input file into an adjacency matrix format. Your program should get an


Write a C++program called adjacenyMatrix.cpp that converts a directed graph stored in an input file into an adjacency matrix format. Your program should get an input file name from a user first. Then, it should read the content of the file and display the graph in the adjacency matrix format. In the assignment, you can assume that the maximum number of vertices in the input graph is less than or equal to 70 or n? 3 2 0 1 1 2 Input file-- This is a sample input file called: Texfile.txt The first line (3 in the example) indicates that there are three vertices in the graph. The second line 2 in the example) presents the number of edges in the graph. The remaining two lines are the edge information in the graph For the homework, you should assume that the first vertex starts from the number 0, Draw a directed graph
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
