1// Copyright Vladimir Prus 2003.
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt
4// or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6#include <boost/property_map/vector_property_map.hpp>
7#include <string>
8#include <iostream>
9
10int main()
11{
12 boost::vector_property_map<std::string> m;
13
14 // Assign string to '4'.
15 m[4] = "e";
16 std::cout << "'" << m[4] << "'\n";
17
18 // Grab string from '10'. Since none is associated,
19 // "" will be returned.
20 std::cout << "'" << m[10] << "'\n";
21}
22

source code of boost/libs/property_map/example/example3.cpp