• 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
Re: Passing variable argument list on to another function
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Passing variable argument list on to another function (From: Christian Mike <email@hidden>)

  • Prev by Date: Re: Passing variable argument list on to another function
  • Next by Date: Re: Bug in NSString stringWithFormat?
  • Previous by thread: Passing variable argument list on to another function
  • Next by thread: Re: Passing variable argument list on to another function
  • Index(es):
    • Date
    • Thread