Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

99miles

macrumors member
Original poster
Oct 10, 2008
50
0
I have a typedef'd struct I want to use in multiple files:

typedef struct point {
int col;
int row;
} point;

When I include it in a header file that is included by multiple files, I get:
"SomeFile.h:18: fatal error: method definition not in @implementation context" where another .h file defines a method with that type:
-(CGRect)createObj: (point)p;

What am I doing wrong?
Thanks!
 
Oops, I got it. I was including the class file, not the header of the file that defined the struct.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.