Re: [Dev-C++] #define a "function" with variable number of parameters
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2005-12-18 21:49:07
|
But then again - do _not ever_ use a vendor-specific extension unless you are _absolutely 100% sure_ that the code need _never ever_ be ported to a different compiler. Until the official standard have incorporated __VA_ARGS__ support (and more than one vendor have implemented it according to the standard), it really should not be used. Given the billions of lines of existing code without use of __VA_ARGS__, it really isn't such an important function that it is worth it to ignore the current language standard. /Per W On Sun, 18 Dec 2005, Daniel K. O. wrote: > Minds Work wrote: > > > That page said that MACRO functions with variable number of arguments > > are only available in C99 and in some C++ compilers (but not in my > > compiler :-( ) > > > Well, if you aren't using Dev-C++/MinGW maybe you'll need some other > non-standard extension provided by your compiler vendor. > MinGW/GCC accepts __VA_ARGS__ just fine on C++. > > > --- > Daniel K. O. |