struct x { char a[10]; char b[20]; int i; char *c; char *d[10]; };
I am filling this struct and then using the values. On the n
If you have a C99 compliant compiler, you can use
mystruct = (struct x){0};
otherwise you should do what David Heffernan wrote, i.e. declare:
struct x empty = {0};
And in the loop:
mystruct = empty;