N
Nils Emil P. Larsen
Hello
I have a pointer to a struct or an array of structs and I know the
lenght of the struct or array of structs.
I need a elegant way to clear it with zeroes.
Is it legal just to do something like
Mystruct *mystruct; // Mystruct is a typedef
for (i=0; i < sizeof(Mystruct); i++)
*(mystruct+i) = 0;
or do I have to clear each individual members ?
Thank you
Nils Emil P. Larsen
I have a pointer to a struct or an array of structs and I know the
lenght of the struct or array of structs.
I need a elegant way to clear it with zeroes.
Is it legal just to do something like
Mystruct *mystruct; // Mystruct is a typedef
for (i=0; i < sizeof(Mystruct); i++)
*(mystruct+i) = 0;
or do I have to clear each individual members ?
Thank you
Nils Emil P. Larsen