Reputation: 1218
I have a function that accepts a variable length array of 80 character strings. I defined the function like so:
void foo (char namelist[][80] ...
in main() I do the following:
char **names = (char **)malloc(numNames * 80);
foo(names);
The type of names here is not correct. What is the appropriate way to type it as a variable length array of fixed length arrays?
Upvotes: 1
Views: 1455