I have following structure:
typedef struct
{
char *name[10];
char *msg[100];
} Log;
How I can free the name and msg arrays from Log structure? I know free is used only for dynamic allocation, and dynamic allocation doesn't work in structures. What I can do?
Tryed this but give error:
typedef struct
{
char *name[] = (char *)malloc(sizeof(char) * 10);
char *msg[] = (char *)malloc(sizeof(char) * 100);
} Log;
Who can help me? Thanks!