Last change
on this file since 33 was
29,
checked in by landauf, 16 years ago
|
updated boost from 1_33_1 to 1_34_1
|
File size:
877 bytes
|
Line | |
---|
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> |
---|
12 | int |
---|
13 | main() |
---|
14 | { |
---|
15 | using namespace boost; |
---|
16 | typedef adjacency_list < listS, listS, directedS, |
---|
17 | property < vertex_name_t, std::string > >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 |
---|
21 | name_map = get(vertex_name, g); |
---|
22 | name_map[u] = "Joe"; |
---|
23 | std::cout << name_map[u] << std::endl; |
---|
24 | return EXIT_SUCCESS; |
---|
25 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.