Society of Robots - Robot Forum
Software => Software => Topic started by: Admin on October 15, 2009, 04:32:27 PM
-
I can't figure out how to do an OR statement using ifdef.
My best guess:
#ifdef MACRO1 || MACRO2
controlled text
#endif
but it doesn't work . . .
../file.h:156:18: warning: extra tokens at end of #ifdef directive
Anyone know?
-
Try
#if defined(TEST_1) || defined(TEST_2)
// do stuff
#endif
-
It works! Thanks!