| Rev | Line | |
|---|
| [12] | 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 | |
|---|
| 10 | int 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.