Hello everyone!
So far i know that the pointer is address value to the real variable.
Pointer size depends on operation system right?
for example
32bit systems: 4byte pointers
64bit systems: 8byte pointers
128bit systems: 16byte pointers?
not sure if its true tho, can't find anything about them in internet so im pretty confused and dont understand what is going on.
Anyways, there have to be an variable type in c++ what can hold a pointer.
Let's imagine that the int is the thing im looking for
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
struct stc1 {
char *chars;
int ints;
}
struct stc2 {
char *chars;
float floats;
}
int *myholder;
myholder = new int[2];
stc1 a1;
stc2 a2;
myholder[0] = &a1
myholder[1] = &a2
|
My wish is to hold different types of variable or groups of different type of variables in one variable.
Im developing program in windows now yet it will be used in linux and who knows with what x bit systems.