-(void)Read {
int i;
FILE* fp;
fp = fopen("test.xxx","r");
fread(&fh,sizeof(FileHeader),1,fp);
...
}
------------------------------------
Which gives me the following warnings and errors:
w: declaration does not declare anything (occurs after #import
"reader.h")
e: "FileHeader" undeclared (first use this function) (after the fread
statement)
I know that this code is supposed to work because it comes straight
from the author. There must be something simple I'm overlooking,
because it looks to me like I HAVE declared these things in the
header. Is there some quirk about structure declarations in Obj-C?
This code was originally in a .cpp file but I don't see anything here
that should cause difficulties. If I replace sizeof(FileHeader) with
sizeof(fh), the program will compile, although it still gives me the
declaration warnings.
Thanks for any ideas,
Mark
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/objc-language/email@hidden