• C

Can macro be created with empty subsituted value?

Will following line of code compile?

#define RTA_printf(...)


Is it must to specify what will be subsituted for RTA_printf(...)
LVL 1
naseeamAsked:
Who is Participating?
 
ZoppoCommented:
Hi naseeam,

you can use variadic macros, this are macros with a variable argument list. There are some restrictions for using them but searching the web one can find even a lot of tricks/workarounds.

For further info maybe a good start to read is http://en.wikipedia.org/wiki/Variadic_macros

Hope that helps,

ZOPPO
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.