No, I'm not a Three Star Programmer :)
As you suggested, I think it's way better to wrap the dynamic array in a struct and pass a pointer around. This is what I do!
Type: Posts; User: qny
No, I'm not a Three Star Programmer :)
As you suggested, I think it's way better to wrap the dynamic array in a struct and pass a pointer around. This is what I do!
arrays are not pointers and pointers are not arrays
I suggest you read section 6 of the comp.lang.c FAQ (and the other sections too).
This works:
#include <stdio.h>
int dummy = 42;
int...