variadic variable argument list in #define
variadic variable argument list in #define
- Subject: variadic variable argument list in #define
- From: Ben Dougall <email@hidden>
- Date: Tue, 10 Feb 2004 00:30:09 +0000
is it possible to use the variadic macros which are detailed here:
<
http://developer.apple.com/documentation/DeveloperTools/gcc-3.3/cpp/
Variadic-Macros.html> in obj-c code?
i'd like to use a variable argument list in a #define macro just like
what's at the start of the above linked to page, but when i use it like
this for example:
#define mf(...) myfunction(__VA_ARGS__,NULL)
i get:
Compiling main.m (1 error, 4 warnings)
main.m:15:37: warning: __VA_ARGS__ can only appear in the expansion of
a C99 variadic macro
main.m:15: `__VA_ARGS__' undeclared (first use in this function)
main.m:15: (Each undeclared identifier is reported only once
main.m:15: for each function it appears in.)
main.m:24:27: warning: __VA_ARGS__ can only appear in the expansion of
a C99 variadic macro
is it possible to use in obj-c code?
thanks, ben.
_______________________________________________
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.