• 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: Variable argument list not working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Variable argument list not working


  • Subject: Re: Variable argument list not working
  • From: Jim Correia <email@hidden>
  • Date: Tue, 13 Aug 2002 14:04:34 -0400

On Tuesday, August 13, 2002, at 01:56 PM, Pierre-Olivier Latour wrote:

In a .cp file I have this function I'd like to call (it's just a test now:
it'll get more complicated later ;) ):

void PixelShox_LogMessage(PSEStringPtr message, ...)
{
va_list args;

va_start(args, message);
printf(message, args);

This is incorrect.

va_end(args);
printf("\n");
}

You need to use vprintf here, not printf.

Jim
_______________________________________________
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.

  • Follow-Ups:
    • Re: Variable argument list not working
      • From: Pierre-Olivier Latour <email@hidden>
References: 
 >Variable argument list not working (From: Pierre-Olivier Latour <email@hidden>)

  • Prev by Date: RE: Variable argument list not working
  • Next by Date: Using bundles
  • Previous by thread: Variable argument list not working
  • Next by thread: Re: Variable argument list not working
  • Index(es):
    • Date
    • Thread