Re: Passing variable argument list on to another function
Re: Passing variable argument list on to another function
- Subject: Re: Passing variable argument list on to another function
- From: Ondra Cada <email@hidden>
- Date: Thu, 23 Aug 2001 18:34:48 +0200
Christian,
>
>>>>> Christian Mike (CM) wrote at Thu, 23 Aug 2001 11:15:03 -0500:
CM> -(void)myAppendFormat:(NSString *)formatString,...
CM> {
CM> char cString[1024];
CM> va_list argList;
CM>
CM> sprintf(cString,[formatString cString],argList);
CM> [self appendString:[NSString stringWithCString:cString]];
CM> }
CM>
CM> But this doesn't seem to work quite right. How can I pass the variable
CM> argument list portion of this on to sprintf?
You can't. Use vsprintf instead.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc