Hello,

Here is my problem:

I declare the vector struct in my .h file and then try to access its fields in the .c file. I did declare a variable of type vector. However, I get a compiler error saying that 'vector has no member named' [x] where x is the fields I defined in my struct. Here is my struct def in the .h file:
typedef struct {
void* elems;
int elemSize;
int logLength;
int allocLength;
} vector;

Thanks!
Liz

Maybe post the portion of the code that gives you the error?
The structure definition is correct.

did you include your .h file in your .c file?... yeah i know its a silly question, but check it, who knows thats the issue...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.