You have no idea what you're talking about.your macros are using them as though they're stings, anything that is not preprocessed that's in the macro well completely mess it up
Again, what the hell are you talking about? I never said anything about strings. These macros don't care WHAT you pass them. That's the whole point of using a macro. Or atleast one point...Code:#include <stdio.h> #define NUMBERPARTY 5 #define NUMBERENEMY 9 #define GROUPCHAR(x) (x)?partychar:enemychar #define GROUPCHAR2(x) (x)?enemychar:partychar #define NUMGROUP(x) (x)?NUMPARTY:NUMENEMY #define CODE(x) (x)?code:code2 int main ( void ) { int partychar=0, enemychar=0, code=0, code2=0; int b=1,c=0; for( c = 0; c < NUMGROUP(b); c++ ) { if( c > 3 ) b=0; code++; //random crap code2--; //random crap partychar *= code; //random crap enemychar += code2; //random crap cout << " c=" << c << " gc=" GROUPCHAR(b) << " gc2=" << GROUPCHAR2(b), << " codex=" CODE(b) << endl; } return 0; }
Quzah.



LinkBack URL
About LinkBacks


