I am trying setup a simple macro that compares 2 numbers and selects the lowest number.
I found the following example from someelse on the C++ board.
#define MINIMUM1 (a, b) (((a) < (b)) ? (a) : (b))
I am confused how I execute the macro from main. I have tried
but that didn't even compile. I received the this error, "term does not evaluate to a function."Code:double lowestNumber; lowestNumber = MINIMUM1(10, 5); cout << "Lowest number = " << lowestNumber;
Any help would be appreciated.