Is this a correct use of the std::cout and std::cin basefields/conversions?
it's safe to say that this is a good example of how I can use different representations in different basefields correctly in C++ ?


I presume you stream manipulators.


  I'm referring to the use of:


std::hex in the std::istringstream case
the use of std::cout.setf() and std::cout.unsetf() in the "output section"


These are examples of stream manipulators:

I would not do this:

#if __cplusplus &lt; 201103L
#include &lt;stdint.h&gt;
#else
#include &lt;cstdint&gt;
#endif


In one version you are putting the functions in the global namespace (stdint.h) the other you are putting the functions in the std namespace. This will cause problems and may give you different results on different compilers.

This seems like you are doing it the hard way:

 if (argc &gt;= 2) {
    switch (argc) {
    case 2:
      std::istringstream(argv[1]) &gt;&gt; std::hex &gt;&gt; bucket["EAX"];
      break;
    case 3:
      std::istringstream(argv[1]) &gt;&gt; std::hex &gt;&gt; bucket["EAX"];
      std::istringstream(argv[2]) &gt;&gt; std::hex &gt;&gt; bucket["EBX"];
      break;
    case 4:
      std::istringstream(argv[1]) &gt;&gt; std::hex &gt;&gt; bucket["EAX"];
      std::istringstream(argv[2]) &gt;&gt; std::hex &gt;&gt; bucket["EBX"];
      std::istringstream(argv[3]) &gt;&gt; std::hex &gt;&gt; bucket["ECX"];
      break;
    case 5:
      std::istringstream(argv[1]) &gt;&gt; std::hex &gt;&gt; bucket["EAX"];
      std::istringstream(argv[2]) &gt;&gt; std::hex &gt;&gt; bucket["EBX"];
      std::istringstream(argv[3]) &gt;&gt; std::hex &gt;&gt; bucket["ECX"];
      std::istringstream(argv[4]) &gt;&gt; std::hex &gt;&gt; bucket["EDX"];
      break;
    default:
      std::cout &lt;&lt; "Too many arguments, exiting now\n";
      exit(EXIT_FAILURE);
    }


Why not a loop?

 if (argc &lt; 2 || argc &gt; 4) {/*ERROR MSG AND EXIT*/}

 std::vector&lt;std::string&gt;  mapIndex = { "EAX", "EBX", "ECX", "EDX" };
 for(int loop = 1; loop &lt; argc; ++loop)
 {
     // PS: just using mapIndex to keep it as close to your original
     //     code as possbile. If I had done this from scratch I would
     //     have just put the values into a four element array.

     std::istringstream(argv[loop]) &gt;&gt; std::hex &gt;&gt; bucket[mapIndex[loop-1]];
 }


The use of std::hex in this situation is correct.
It marks the input stream and the next value (if an hex integer) is correctly read.