Hi, so I'm having a strange problem right now when I'm initializing an array that is a double pointer. The line that is causing me problems is
lines->list = malloc(num_elements * sizeof(char *))
Lines is a struct, and list is a double pointer to a character. So
All I'm trying to do is initialize my double to hold num_elements in it. There are a couple of questions/problems I'm having when I run gdb and step to this line. One is, is sizeof(char *) supposed to be size 8? And also, when I look at the elements of list, list is empty, list and list have something in it, and list is invalid. This doesn't really make sense to me because num_elements evaluates to 2, so first only list and list should be valid.
Also, I'm not sure if this is useful information, but I've tried just putting actual numbers in for num_elements and sizeof(char *) and it still doesn't work.