mixing c with obj c
mixing c with obj c
- Subject: mixing c with obj c
- From: Phillip Morelock <email@hidden>
- Date: Fri, 12 Apr 2002 16:48:52 -0700
Hi,
Excuse my newbie-ness at the fu of mixing "straight" c with obj-c...
I am trying to declare this in an object interface as an instance variable.
what am i doing wrong?
@interface MyThingy : NSObject
{
id foo[];
}
....
@end
yes i know, NSMutableArray or etc...but I am implementing some data
structures using a mix of straight / obj C...have had no problems declaring
structs and declaring pointers to them in class interfaces, etc., but this
id[] thing is throwing me for a loop.
Neither
id foo[];
nor
id[] foo;
seems to work.
The thing is -- i don't want to declare a size (id foo[10]) because it's an
array-based implementation of a data structure...i need to be able to double
the array, obviously i just want a pointer.
Am i just out of luck or do i need to do something a little different? like
void pointer arithmetic and etc? I am keeping track of some "size" figures
and such, so I *think* i could still be safe while relying on pointer
arithmetic.
t.i.a. if anyone even understands my garbled question ;)
fillup
_______________________________________________
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.