Hello I'm trying to display the memory location(s) of an array of pointers. It works, but it prints the memory locations out as:
e.g.
(0x7fff672e19a0)
I know that is the memory location, but in other examples, I've seen it being displayed as
4041
Here is the function:
void display_pointer(int theSize)
{
int counter = 0;
for(int i=0; (i < theSize); i++)
{
char thePointer = myInt[i];
char* ipPtr[theSize];
ipPtr[i]= &thePointer;
cout << *ipPtr[i];
counter++;
if(counter == 11)
{
cout << "(" << &ipPtr[i] << ")";
counter = 0;
}
}
}
Thanks =)