Article written by

3 Responses

Page 1 of 1
  1. Jac Goudsmit
    Jac Goudsmit at |

    For those working with older C compilers that don't support variable macro arguments, you can do this:

    #ifdef DEBUG

      #define PRINTD(x) printf


      #define PRINTD(x) (void(0))


    PRINTD(("Hello debugger\n"));

    PRINTD(("The number you dialed, %u, is not in service\n", 911));

  2. Jac Goudsmit
    Jac Goudsmit at |

    oops that should be
    #define PRINTD(x) printf x

Please comment with your real name using good manners.

Leave a Reply


%d bloggers like this: