-   Programming (
-   -   C: global typedefs (

dominik81 11-30-2003 12:14 PM

C: global typedefs

I'm having trouble with typedefs in C (using gcc 3.3.1).

This is what I have:
- file "main.c"
- file "objects.c"
- file "objects.h" with "typedef struct { ... } objects;" in it.

I can use the type "objects" in main.c and initialize variables of this type. But I cannot create variables from within objects.c! What am I doing wrong? It does work however when I put the typedef again in my objects.c but I think that's quite redundant.

coolman0stress 11-30-2003 02:34 PM

are you including "objects.h" in "objects.c"?

All times are GMT -5. The time now is 11:35 AM.