- dict current;
- dict::iterator im = current.find("00380010");
- current["00100010"] = "Patient Name";
- current["7fe00010"] = "Pixel Data";
- current["50000010"] = "Number of points";
- current["00380010"] = "Admission ID";
+ dict tb1;
+ dict::iterator im = tb1.find("00380010");
+ tb1["00100010"] = "Patient Name";
+ tb1["7fe00010"] = "Pixel Data";
+ tb1["50000010"] = "Number of points";
+ tb1["00380010"] = "Admission ID";
+
+ std::cout << "Traversal of dictionary (note the proper ordering on key)." << std::endl;
+ for ( im = tb1.begin(); im != tb1.end(); ++im )
+ std::cout << " \"" << im->first << "\" = " << im->second << std::endl;
+ std::cout << "End of dictionary." << std::endl;