Reading in HEX number from file
<p>This has me pretty bothered as I should be able to do it but when I read in the hex number and assign it to an unsigned int when I print it out I get a different number.  Any advice would be great.  Thanks</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;string&gt;
using namespace std;

int main()
{
fstream myfile;
myfile.open("test.text");
unsigned int tester;
string test;
myfile &gt;&gt; hex &gt;&gt; tester;
cout &lt;&lt; tester;
system("pause");
return 0;
}
</code></pre>
