Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/property_map/example3.cpp @ 13

Last change on this file since 13 was 12, checked in by landauf, 17 years ago

added boost

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.