I have a struct containing the command char var_name[200];
and a typedef after it (typedef struct list_var* data
) and I have a function that gets the parameter char* var
. In this function I try the following:
data new_var = (data) malloc(sizeof(struct list_var));
new_var->var_name = var
But in this line I get an error, saying "incompatible types when assigning to type char[200] from type char*.
Please help me.