Re: Variable argument list not working
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.