Hi, everyone! I'm working on a topological sort problem. I have to read in a text file which contains the information of the graph and output the result to another txt file.
In the input file there are "groups" of data as below(below is one group):
The first integer (28) is the amount of vertices of the graph, followed by the No. of each vertex (19 22 25 28 ... 100)
The next integer (26) is the amount of edges of the graph, followed by the corresponding amount of edges. For instance, 43 > 37 means the directed edge points from 43 to 37.
However, I don't know how to read in this file by ifstream.
Thanks for your help in advance!