]> Creatis software - gdcm.git/blobdiff - Testing/TestHash.cxx
misplaced return 0.; for ACR/NEMA
[gdcm.git] / Testing / TestHash.cxx
index f8d58bcc32fc129dc854b821f57e5727b8f34229..b02905f970bfe89b0c1bc38c73d533335fc407cc 100644 (file)
@@ -1,24 +1,36 @@
 #include <map>
 #include <string>
 #include <iostream>
+#include <stdio.h>
+
+int main() {
 
-int main()
-{
   typedef map<string, char*> dict;
   
-  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";
 
        cout << "Traversal of dictionary (note the proper ordering on key)." << endl;
-       for ( dict::iterator im = current.begin(); im != current.end(); ++im )
+       for ( dict::iterator im = tb1.begin(); im != tb1.end(); ++im )
                cout << "   \"" << im->first << "\" = " << im->second << endl;
        cout << "End of dictionary." << endl;
 
        cout << "Find request on key 00380010" << endl;
-       im = current.find("00380010");
+       im = tb1.find("00380010");
        cout << "   \"" << im->first << "\" = " << im->second << endl;
+       
+       int i = 0x0010;
+       std::cout.setf(std::ios::hex);
+       std::cout << i << endl;
+       std::cout.setf(std::ios::dec);
+       std::cout << i << endl; 
+       
+       // Voir :
+       //http://www.developer.com/net/cplus/article.php/10919_2119781_3
+       //
+       // domage que ca ne marche pas ...
 }