Maybe you should backtrack a bit.
Remember macros can be used mostly in two ways:
* either as symbolic constants, e.g. "#define PI 3.14", in which case, you use directly the symbol in your code,...
Type: Posts; User: root4
Maybe you should backtrack a bit.
Remember macros can be used mostly in two ways:
* either as symbolic constants, e.g. "#define PI 3.14", in which case, you use directly the symbol in your code,...
I don't see anything changed since the last time.
MAX2 is fine, but MAX3 is a macro function which, by definition, takes 3 arguments: #define MAX3(x, y, z) ...
Now, how do you compose x, y, z and...
You can call MAX2(x, y) from MAX3(x, y, z) but not the way you've done earlier.
Think of MAX2 as being a function, *not a value*, you pass values as arguments to function, you don't pass functions...
There are several reasons to use macros, the major one is to create a function template which can be applied to different types of arguments, typically the whole range of integers and floats.
This...