author | marci |
Tue, 21 Sep 2004 21:10:26 +0000 | |
changeset 893 | 89d5c283a485 |
parent 286 | d3c4d99860a9 |
child 921 | 818510fa3d99 |
permissions | -rw-r--r-- |
klao@283 | 1 |
#include <iostream> |
klao@283 | 2 |
|
klao@618 | 3 |
#include <hugo/maps.h> |
klao@283 | 4 |
|
klao@283 | 5 |
using namespace std; |
klao@286 | 6 |
using namespace hugo; |
klao@283 | 7 |
|
klao@283 | 8 |
int main() |
klao@283 | 9 |
{ |
klao@286 | 10 |
ConstMap<int, char> a('#'); |
klao@283 | 11 |
|
klao@286 | 12 |
cout << "sizeof ConstMap<int,char> = " << sizeof a << endl; |
klao@286 | 13 |
cout << "a[5] = " << a[5] << endl; |
klao@283 | 14 |
|
klao@286 | 15 |
StdMap<int, char> b('$'); |
klao@286 | 16 |
cout << "sizeof ConstMap<int,char> = " << sizeof b << endl; |
klao@286 | 17 |
cout << "sizeof std::map<int,char> = " |
klao@286 | 18 |
<< sizeof(std::map<int,char>) << endl; |
klao@286 | 19 |
cout << "b[5] = " << b[5] << endl; |
klao@286 | 20 |
|
klao@286 | 21 |
b[5]='l'; |
klao@286 | 22 |
cout << "b[5] = " << b[5] << endl; |
klao@283 | 23 |
} |