[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: about C program CPP macro



Den 10. des. 2013 15:19, skrev Nicol TAO:

I want to using #define / #undef, and want to put them in a single macro, some thing like:

#define DECALRE_TYPE(type) \
{ #undef __curr_type;  #define _curr_type type; }

Why do you need to #undef it first? Can you do without the #undef and use typedef instead of the #define-macro?

Btw., You can ask about this on Stackoverflow, sometimes questions get answered in 20 seconds or so :-)

http://ww.stackoverflow.com/


Atle.


Reply to: