[ObjC newbie]: dereferencing pointer to incomplete type
[ObjC newbie]: dereferencing pointer to incomplete type
- Subject: [ObjC newbie]: dereferencing pointer to incomplete type
- From: Rob Kuilman <email@hidden>
- Date: Sun, 3 Aug 2003 23:37:39 +0200
Hey all!
I've been switching from Carbon/C++ tot Cocoa/Obj-C, learning goes
well, and so far is easier than i expected it to be.
However, i have a problem (obviously), here comes the code first:
//
// in my header:
//
@interface myInterface : NSObject {
@public
struct _RK_MY_STRUCT_ {
int myInt;
char myChar[124];
char reserved[384];
};
// code
@private
struct _RK_MY_STRUCT_ * myData;
}
//
// in my code:
//
- (void) myfunction {
// ...
myData = malloc(sizeof(struct _RK_MY_STRUCT_));
myData->version =1;
// ...
}
Normally, in C, this would work for me... however, while trying to
compile it, i get the following error:
'dereferencing pointer to incomplete type'
and THAT's what im not able to figure out. So if anyone wants to
enlighten me on Objective-C or tell me that i've had
a too long vacation, i'd be very grateful.
Thanks in Advance,
Robert K.
-----------------------------{ Official Cocoa Newbie!
}-----------------------------
web:
http://halfduplex.net/
email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.