Re: mixing c with obj c
Re: mixing c with obj c
- Subject: Re: mixing c with obj c
- From: Ondra Cada <email@hidden>
- Date: Sat, 13 Apr 2002 01:58:20 +0200
On Saturday, April 13, 2002, at 01:48 , Phillip Morelock wrote:
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.
Right. So declare one:
...
id *foo;
...
The usage is straighforward:
foo=calloc(number_of_elements,sizeof(*foo));
...
foo[N]=[NSObject new];
...
[foo[N] retain];
...
free(foo);
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.