A
Anthony
Hi,
I've got a question about the allignment of data in a structure.
What happens in memory when i declare the following
struct A
{
int x;
}
stuct B : public A
{
int y;
}
Is it compiler specific how the memory is alligned when I instance B?
Or can do something like this:
B b;
int* z = &(reinterpret_cast<int>(b)); //z point to x
z++; //z points to y
Or does the VTABLE pointer cause problems here?
Thanks in regard,
Anthony Lansbergen
I've got a question about the allignment of data in a structure.
What happens in memory when i declare the following
struct A
{
int x;
}
stuct B : public A
{
int y;
}
Is it compiler specific how the memory is alligned when I instance B?
Or can do something like this:
B b;
int* z = &(reinterpret_cast<int>(b)); //z point to x
z++; //z points to y
Or does the VTABLE pointer cause problems here?
Thanks in regard,
Anthony Lansbergen