Search:

Type: Posts; User: root4

Search: Search took 0.02 seconds.

  1. Replies
    32
    Views
    43,282

    Maybe you should backtrack a bit. Remember...

    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,...
  2. Replies
    32
    Views
    43,282

    I don't see anything changed since the last time....

    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...
  3. Replies
    32
    Views
    43,282

    You can call MAX2(x, y) from MAX3(x, y, z) but...

    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...
  4. Replies
    32
    Views
    43,282

    There are several reasons to use macros, the...

    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...
Results 1 to 4 of 4