Please consider the following code:
const char* cTitle = "MyTitle";
__int64 i = reinterpret_cast<__int64>(ctitle);
Every time i run this code, i get different value of i
.
Now i want to write a test to check whether we sent to correct title or not, so i am using the following code to achieve the target but unable to get the title using reinterpret_cast
:
char* cOrgValue = reinterpret_cast<char*> (i);
Is it even possible to get the original title value and if yes, then is this is correct way to do so?
EDIT
So let me rephrase the question:
How can i get the original value of char*
after I cast it into __int64
using reinterpret_cast.