I have a struct that contains many different datatypes including arrays of other stucts, ints, floats, chars, char arrays etc. I have dynamically declared a ptr to the struct in main. I then pass the ptr deep into my functions and sub functions.
It is a struct that holds gym program info. My program can write/load/save this data.
Question - I would like to know how I can reset the struct that my ptn points to.. that way if a smaller program is loaded there is no left over data in the struct from the previous program?
I have been reading about memset but my understanding is it will not work for a struct.
Can anyone offer some advice?