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
#2

I dont think we can define macros. as they are intended for compilers... I could be wrong... dont know.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)