I'm having trouble trying to assign a md array into a struct md array. Basically:
typdef struct {
int num;
char array[30][80];
} Vars;
then in main I did some parsing to make an array of strings, which is aclled strArray and is also [30][80]. However, when I try to do this
char strArray[30][80] = {"example", "text"};
Vars *vars = (Vars *) malloc(sizeof(Vars);
vars->array = strArray;
I keep getting an error
error: incompatible types when assigning to type ‘char[30][80]’ from type ‘char (*)[80]’
I've tried to do it even string by string in a for loop, but keep getting errors. Any ideas? Thanks!