XRDS: Hello World (Spring 2011)
The code for the article "Boosting productivity with the Boost Graph Library" (XRDS, March 2011) (download)
Installation instructions
- Download and install the graphviz package from www.graphviz.org.
- Download and install the last version of the Boost libraries from www.boost.org.
- Compile the file main.cpp. The program accepts three arguments:
- Number of vertices in the graph
- Number of edges in the graph
- Filename to writing the resulting graph (to be displayed later,
see below).
Example:
main.exe 8 8 output.gv
- Produce a picture of the graph with the "dot" utility from the
graphviz package:
dot -Teps output.gv -ooutput.eps