Thread: how to call macros from the command prompt

  1. #1
    Registered User
    Join Date
    Jul 2006
    Posts
    13

    how to call macros from the command prompt

    hi

    how to call a macro from the command prompt

  2. #2
    Registered User
    Join Date
    Jan 2007
    Posts
    330
    a macro will be expanded into C code and is not a direct function call so you cant do that

  3. #3
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Not sure he means that...

    What exactly *do* you mean?

  4. #4
    Registered User
    Join Date
    Jul 2006
    Posts
    13
    if i have a code like this :

    #ifdef TABLE_SIZE
    int table[TABLE_SIZE];
    #endif

    how to define TABLE_SIZE in this case

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    You mean something like
    gcc -DTABLE_SIZE=100 prog.c
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Error C2664 - Trying to call an external Dll
    By jamez05 in forum C++ Programming
    Replies: 3
    Last Post: 08-08-2006, 06:07 AM
  2. Class won't call
    By Aalmaron in forum C++ Programming
    Replies: 3
    Last Post: 04-13-2006, 04:57 PM
  3. Iterative Tree Traversal using a stack
    By BigDaddyDrew in forum C++ Programming
    Replies: 7
    Last Post: 03-10-2003, 05:44 PM
  4. template fn replacements for msg macros
    By Ken Fitlike in forum Windows Programming
    Replies: 17
    Last Post: 10-30-2002, 07:55 AM
  5. call by reference and a call by value
    By IceCold in forum C Programming
    Replies: 4
    Last Post: 09-08-2001, 05:06 PM