• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[ObjC newbie]: dereferencing pointer to incomplete type
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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.
  • Follow-Ups:
    • Re: [ObjC newbie]: dereferencing pointer to incomplete type
      • From: publiclook <email@hidden>
  • Prev by Date: Re: Invisible Characters
  • Next by Date: Re: Screen Resolution
  • Previous by thread: Keyed Archiver
  • Next by thread: Re: [ObjC newbie]: dereferencing pointer to incomplete type
  • Index(es):
    • Date
    • Thread