lI'm running a C++ program on a 64-bit machine. The program dynamically creates objects from different classes. When I print out the value of the pointers (not dereferencing) to those objects using cout, the address of some objects is 48-bits while the address of other objects is 28-bits! I have read that some processors currently only support 48-bits, but why then do I get an output of 28-bits in some cases? What does that even mean?!
Edit:
This is part of a big project. So, I won't be able to post the exact code. But here is what is basically happening. I do realize that the objects need to be deleted to avoid memory leaks.
ClassA *pA = new ClassA();
ClassB *pB = new ClassB();
cout << "Address of ClassA object = " << pA << " , Address of ClassB object = " << pB << endl;
pA = new ClassA();
pB = new ClassB();
cout << "Address of ClassA object = " << pA << " , Address of ClassB object = " << pB << endl;
Now the output that I get is the following:
Address of ClassA object = 0x7fcda0001150 , Address of ClassB object = 0x19f1160
Address of ClassA object = 0x26c77c0 , Address of ClassB object = 0x1aba400