Im dynamically allocating some memory, but i get the error:
syntax error : missing ')' before '{'
I have counted the number of brackets and i cant see why im getting it. Any ideas? is there something im doing that im not allowed to do syntactically?
Also, related to this. The array im allocating is apart of a struct, so if i was to define the array. Will it then work if i do say:Code:MALLOC(oObjectData, (sizeof(Objects *)*OINCREMENT)); // Error here for(iObjectSet=0; iObjectSet<OINCREMENT; iObjectSet++) MALLOC(oObjectData[iObjectSet], sizeof(Objects)); // and here
struct_name.oObjectData[count]
Only if i make the array in the structure in the malloc function itself (eg MALLOC(struct_name.oObjectData, ...) it doesnt seem to like it.