Crossroads The ACM Magazine for Students

Sign In

Association for Computing Machinery

XRDS: Hello World (Spring 2011)

The code for the article "Boosting productivity with the Boost Graph Library" (XRDS, March 2011) (download)


Installation instructions

  1. Download and install the graphviz package from www.graphviz.org.
  2. Download and install the last version of the Boost libraries from www.boost.org.
  3. 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).
      main.exe 8 8 output.gv
  4. Produce a picture of the graph with the "dot" utility from the graphviz package:
    dot -Teps output.gv -ooutput.eps