Jul 8, 2006 #1 H Help Advanced Member level 2 Joined Feb 15, 2005 Messages 617 Helped 7 Reputation 14 Reaction score 3 Trophy points 1,298 Activity points 7,065 What is the function for this macros below? What's the advantage for this? Code: #define MYCASE(_item,_id) \ case _id: \ _item##_##_id=_id;\ break switch(x) { MYCASE(widget,23); } How can we add another.. - MYCASE(widget,24); - MYCASE(widget,35); - MYCASE(high,168); and can we add more case in one MYCASE? Can you please rewrite the program and show it? Thank You. ThanK You
What is the function for this macros below? What's the advantage for this? Code: #define MYCASE(_item,_id) \ case _id: \ _item##_##_id=_id;\ break switch(x) { MYCASE(widget,23); } How can we add another.. - MYCASE(widget,24); - MYCASE(widget,35); - MYCASE(high,168); and can we add more case in one MYCASE? Can you please rewrite the program and show it? Thank You. ThanK You