Zero out two dimensional array
I have an array
whenever i write to it, it works fine.
the problem arises when i write to it again.
if a shorter string of characters is written than the last [to the same array element], the existing characters are displayed after the null terminator of the latest string written.
I know i can combat this by memset()ing the array to zero before writing to it again.
The problem is i do not know weather i should start from host_fname or host fname and how long to set memory to zero (without, obviously affecting memory not allocated to this array) - given that i would like to reset the whole array.
thankyou for any advice regarding this matter, you help is much appreciated