Re: NSString array to -> char**
Re: NSString array to -> char**
- Subject: Re: NSString array to -> char**
- From: Seth Delackner <email@hidden>
- Date: Sun, 16 Mar 2003 03:13:07 -0800
On Saturday, March 15, 2003, at 11:36 PM, Chris Ridd wrote:
You can go through the variable arguments again by calling
va_start(varargs, arg1) right after calling va_end(varargs) the first
time. Then your first loop can just increment a counter.
I have encapsulated the functionality in a class SDCStringArray with
the important initializer:
-(id)initWithVarArgs:(NSString*) arg1, ...;
But then I realized that this class will be called by methods that
themselves take variadic argument lists, so I tried
-(id)initWithVarArgs:(NSString*) arg1 {
va_list varargs;
va_start(varargs, arg1)
}
With the idea that va_start would somehow magically understand the
impossible (that we should be looking at not our own set of parameters
following arg1, but the set of parameters following arg1 in the parent
function. So I can va_start a list in the caller, then pass the list,
then close it after the method is done, but this is ugly and makes it
impossible for the method to traverse the list twice.
Thanks for the advice thus far. Is there a solution to this part?
_______________________________________________
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.