Code error

Programming, for all ages and all languages.
Post Reply
beyondsociety

Code error

Post by beyondsociety »

I wrote some code to dump the debug information of my computer when an exception is thrown and when I compile it, GCC give me this error: request for member ' ' in something not a structure or union.

I searched google for an answer but I could only find bits and pieces. So I turned to the chapter on structurs in my C programming book. Its was some help, but I still dont know whats wrong.

Has anybody ever encountered this error? What does it mean and how do I fix it?
Tim

Re:Code error

Post by Tim »

Yes. It means you've tried to use . or -> on something that isn't a structure or a union.

Maybe you've got a pointer to a structure or union, and you're using . when you should be using ->.
beyondsociety

Re:Code error

Post by beyondsociety »

It means you've tried to use . or -> on something that isn't a structure or a union.

Maybe you've got a pointer to a structure or union, and you're using . when you should be using ->.
I had a member that was defined in my structure but I wasnt using it [pointing to it]and thus it was generating an error.

Thanks for the help tim.
Post Reply