]> Creatis software - gdcm.git/blob - hashtest.cxx
* src/gdcmHeader.cxx :
[gdcm.git] / hashtest.cxx
1 #include <map>
2 #include <string>
3 #include <iostream>
4
5 int main()
6 {
7   typedef map<string, char*> dict;
8   
9   dict current;
10   current["00100010"] = "Patient Name";
11   current["7fe00010"] = "Pixel Data";
12   current["50000010"] = "Number of points";
13   current["00380010"] = "Admission ID";
14
15         cout << "Traversal of dictionary (note the proper ordering on key)." << endl;
16         for ( dict::iterator im = current.begin(); im != current.end(); ++im )
17                 cout << "   \"" << im->first << "\" = " << im->second << endl;
18         cout << "End of dictionary." << endl;
19
20         cout << "Find request on key 00380010" << endl;
21         dict::iterator im = current.find("00380010");
22         cout << "   \"" << im->first << "\" = " << im->second << endl;
23 }