>> You could also simply use your PC time as the seed for the srand function. > > I didn't suggest that because I made the following inadvertent > mistakes sometimes. I used time for srand in a program and I launched > multiple instances of the program from a script. Since the launch were > near simultaneous, the results were not generated by random enough > inputs. Should be enough for his purposes (generate weights for graph edges). will probably run one instance of the program alone.
If use of C++ is being done, using the random facility from boost library maybe a good idea. It is quite decent. In addition maybe graph facility from it can also be used (assuming the assignment allows that). You can use graphviz to show the graphs also then by using the read/write facility. Best Regards Gajendra -- l...@iitd - http://tinyurl.com/ycueutm
