Saturday, September 21, 2013

preprocessor check if empty

Newsgroup: comp.lang.c++

Subject: preprocessor check if empty

From: Philipp Kraus <philipp.kraus@...>

Date: Sat, 21 Sep 2013 23:54:06 +0200



Hello,



I hope my question is not off-topic.

My problem is defined as



#define DOSOME(x, รข??) docppcall(x % __VA_ARGS__)



but if __VA_ARGS__ is empty the replace should be docppcall(x), without

the % char. The % char should be only set, if exists an argument.

How can I create a working solution?



Thanks



Phil









via Usenet Forums - Usenet Search,Free Usenet - comp.lang.c++ http://www.pocketbinaries.com/usenet-forums/showthread.php?92668-preprocessor-check-if-empty&goto=newpost

View all the progranning help forums at:

http://www.pocketbinaries.com/usenet-forums/forumdisplay.php?128-Coding-forums

No comments:

Post a Comment