COIN-OR::LEMON - Graph Library

source: lemon-0.x/src/work/klao/map_test.cc @ 368:0beed7a49063

Last change on this file since 368:0beed7a49063 was 286:d3c4d99860a9, checked in by Mihaly Barasz, 21 years ago

Miscellaneous maps, early version
skeletons/maps.h: minor bug

File size: 494 bytes
RevLine 
[283]1#include <iostream>
2
[286]3#include <maps.h>
[283]4
5using namespace std;
[286]6using namespace hugo;
[283]7
8int main()
9{
[286]10  ConstMap<int, char> a('#');
[283]11
[286]12  cout << "sizeof ConstMap<int,char> = " << sizeof a << endl;
13  cout << "a[5] = " << a[5] << endl;
[283]14
[286]15  StdMap<int, char> b('$');
16  cout << "sizeof ConstMap<int,char> = " << sizeof b << endl;
17  cout << "sizeof std::map<int,char> = "
18       << sizeof(std::map<int,char>) << endl;
19  cout << "b[5] = " << b[5] << endl;
20
21  b[5]='l';
22  cout << "b[5] = " << b[5] << endl;
[283]23}
Note: See TracBrowser for help on using the repository browser.