no, you have to allocate memory when using pointers. look up "pointers" in your c language reference. and the correct way to use structs is with the "struct" keyword before your structure identifier, e.g. struct MYSTRUCT s; or struct MYSTRUCT *s = malloc(sizeof(struct MYSTRUCT)), exception herefore is of course using typedefs for declaring structures.
to allocate an array of ten MYSTRUCTS:
Code:
struct MYSTRUCT *structs = malloc(sizeof(struct MYSTRUCT) * 10);
now you can pass this array to function f as follows:
Code:
void f(struct MYSTRUCT *structs, var count);
//...
f(structs, 10);
that is because pointers and arrays have a tight relationship in c. they're basically the same language feature (in plain c, you can replace * by [] nearly at will); the difference in between them is in memory allocation and memory access. declaring and defining var a[3] = {0, 1, 2} gives you the variable a which can't be reassigned but will be converted silently into var *a when passed to a function expecting a pointer as parameter. this conversion will not be done recursively and thus won't work with multidimensional arrays or pointers to pointers.
that's just a brief overview...
joey.