|
Using macros with operator symbols
For reasons that make sense to my application, I want to have a macro defined that will change "FOO=x;" to "BAR+=x;". To do "FOO=x; BAR+=FOO;" would be horribly unwieldy, and would not work in this application. I have tried "#define FOO BAR+", but I get a syntax error on the "FOO=x;" line. I have also tried "#define FOO= BAR+=", but the equals sign is an invalid character in macro names. Is there some way to make this work my way, or am I going to have to do some other dirty work-around?
__________________
Team 1743 - The Short Circuits
2010 Pittsburgh Excellence in Design & Team Spirit Awards
2009 Pittsburgh Regional Champions (thanks to 222 and 1218)
2007 Pittsburgh Website Award
2006 Pittsburgh Regional Champions (thanks to 395 and 1038)
2006 Pittsburgh Rookie Inspiration & Highest Rookie Seed
Team 1388 - Eagle Robotics
2005 Sacramento Engineering Inspiration
2004 Curie Division Champions (thanks to 1038 and 175)
2004 Sacramento Rookie All-Star
_
|