#include "ReadGraph.h" void main(int argc, char **argv) { if (argc != 2) { printf("please include exactly one argument, the name of the file which contains the graph to be read"); } else { GraphInfo g; if (readGraph(argv[1], g)) { // At this point, g.name is the name of the graph, // g.nNodes is the number of nodes, g.nEdges is // the number of edges, and g.edges[i].u and // g.edges[i].v are the labels for the vertices // on edge i. g.print(); } else { printf("couldn't read the graph from %s\n", argv[1]); } } }