rustywaters
Programmer
Hi,
I am trying to remember how I used to automatically calculate the size of a struct, inside the struct:
for example:
struct myStruct
{
int miInt;
int miAnotherInt;
char mcChar;
int *mpiPInt;
/* SOMETHING HERE such as : */
int miSizeofmyStruct = OFFSETOF(miSizeofmyStruct) - OFFSETOF(miInt);
}; /* OR SOMETHING LIKE THIS */
any help??
I am trying to remember how I used to automatically calculate the size of a struct, inside the struct:
for example:
struct myStruct
{
int miInt;
int miAnotherInt;
char mcChar;
int *mpiPInt;
/* SOMETHING HERE such as : */
int miSizeofmyStruct = OFFSETOF(miSizeofmyStruct) - OFFSETOF(miInt);
}; /* OR SOMETHING LIKE THIS */
any help??