adj-matrix-graph">Figure 1</a>.
<pre>
  enum { A, B, C, D, E, F, N };
  const char* name = "ABCDEF";

  typedef boost::adjacency_matrix&lt;boost::directedS> Graph;
  Graph g(N);
  add_edge(B, C, g);
  add_edge(B, F, g);
  add_edge(C, A, g);
  add_edge(C, C, g);
  add_edge(D, E, g);
  add_edge(E, D, g);
  add_edge(F, A, g);

  std::cout &lt;&lt; "vertex set: ";
  boost::print_vertices(g, name);
  std::cout &lt;&lt; std::endl;

  std::cout &lt;&lt; "edge set: ";
  boost::print_edges(g, name);
  std::cout &lt;