c++ input hexadecimal without 0x
<p>I'm making a project that dumps a file by putting the offsets (hexadecimal). I must put the hexadecimal with 0x like 0xBEE4DC because the application will crash or return an error if I put a hexadecimal without 0x like BEE4DC. Is there a way to put the hexadecimal without "0x" ?</p>

<p>This is my code. i'm keeping this project secret so I don't show more code than this.</p>

<p>dump1.cpp</p>

<pre><code>void LoadMetadata(char* szFile)
{
    string mystr;
    int offset2;
    int offset1;
    std::cout &lt;&lt; "Input unknown offset #1: ";
    getline(cin, mystr);
    stringstream(mystr) &gt;&gt; offset1;
    std::cout &lt;&lt; "Input unknown offset #2: ";
    getline(cin, mystr);
    stringstream(mystr) &gt;&gt; offset2;
    std::cout &lt;&lt; "\n";

    ...

}
</code></pre>

<p>dump2.cpp</p>

<pre><code>static int offset2;
static int offset1;

void LoadDumpLib(char* szFile)
{

...
    pCodeRegistration = (DumpCodeRegistration*)MapVATR(offset2, pLibIl2Cpp);
    pMetadataRegistration = (DumpMetadataRegistration*)MapVATR(offset1, pLibIl2Cpp);

...
}
</code></pre>