Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/property_map/example3.cpp @ 44

Last change on this file since 44 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 551 bytes
Line 
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/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}
Note: See TracBrowser for help on using the repository browser.