int main(int argc, char* argv[])
{
int *pInt;
int iParam = 423425;
pInt = &iParam;
std::cout<<&pInt<<std::endl;
system("pause");
return 0;
}
Why am i getting address like 1250008 and not like 0x00000 ?
It returns you the addresss where
pIntis located in virtual memory.It can be any address. The compiler is free to place an pointer at any address in the address space allocated to an process.
If you mean to get the address in
hexand not decimal, you need to do use I/O Manipulator like this: