Variable argument list not working
Variable argument list not working
- Subject: Variable argument list not working
- From: Pierre-Olivier Latour <email@hidden>
- Date: Tue, 13 Aug 2002 19:56:58 +0200
Hi,
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);
va_end(args);
printf("\n");
}
However, calling:
PixelShox_LogMessage("Test: %s %s", "(1)", "(2)");
prints:
"Test: (2)" and the new line char
I've done many tests, but I can't figure out what's going wrong, and why the
2 argument disappears... Is it because the function is in a .cp file?
_____________________________________________________________
Pierre-Olivier Latour email@hidden
Lausanne, Switzerland
http://www.pol-online.net
_______________________________________________
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.