I have a pointer to an int.
int index = 3;
int * index_ptr = &index;
index_ptr
is a member variable of a class IndexHandler
.
class A has a std::vector of IndexHandlers, Avector. class B has a std::vector of pointers to IndexHandlers, Bvector, which I set to point to the items in class A's vector, thusly:
Bvector.push_back(Avector[i].GetPtr())
With me so far?
I want to check that when I resolve the pointers in Bvector, and retreive the internal IndexHandlers index_ptr
, that they point to the same index_ptr
as class A's...
How can I check they are pointing to the same memory address?... How do i print the address of the value pointed to by both sets of pointers?