• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //=======================================================================
2 // Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See
5 // accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7 //=======================================================================
8 #include <boost/config.hpp>
9 #include <iostream>
10 #include <string>
11 #include <boost/graph/adjacency_list.hpp>
main()12 int main()
13 {
14     using namespace boost;
15     typedef adjacency_list< listS, listS, directedS,
16         property< vertex_name_t, std::string > >
17         graph_t;
18     graph_t g;
19     graph_traits< graph_t >::vertex_descriptor u = add_vertex(g);
20     property_map< graph_t, vertex_name_t >::type name_map = get(vertex_name, g);
21     name_map[u] = "Joe";
22     std::cout << name_map[u] << std::endl;
23     return EXIT_SUCCESS;
24 }
25