I\'m trying to make a macro with the following formula: (a^2/(a+b))*b, and I want to make sure that the there will be no dividing by zero.
(a^2/(a+b))*b
#define
YES you can have an if statement in a macro. You need to format it correctly. Here is an example:
#define MY_FUNCTION( x ) if( x ) { PRINT("TRUE"); } else { PRINT("FALSE"); }