Question about #define
#1

So today I was wondering if it is possible to create a macro "#redefine"? Was thinking something like this:

Код:
#define redefine %0 %1
#if defined %0
	#undef %0
#endif
#define %0 %1
Then I would just have to do:

Код:
#redefine MAX_PLAYERS (50)
Which is actually going to save me from doing this:

Код:
#if defined MAX_PLAYERS
	#undef MAX_PLAYERS
#endif
#define MAX_PLAYERS (50)
Reply


Messages In This Thread
Question about #define - by Nathan94 - 02.02.2019, 12:03
Re: Question about #define - by GeorgeMcReary - 02.02.2019, 13:04

Forum Jump:


Users browsing this thread: 1 Guest(s)