Hi all,
How to find the offset of a structure member just by knowing the structure name and the address of that member?????
For ex.
Struct cook
{
int a;
int b;
char c;
}eat;
void func(int *ptr)
{
//how to find the base address of structure.
//I know only the structure name i.e 'cook' and the address of b i.e 'ptr'
//If the offset to address b is found ,the base address can be found out!!!!!
}
main()
{
func(&eat.b);
getch();
}
Thanks in advance
:)