Thread: #define question

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    4

    #define question

    Is there a way to print the value used in a #define statement?

    example:

    #define N 100

    ... later in the program...

    printf("N");

    this is a simplification, but how do I get that print statement to show 100 instead of N?

    Thanks for any help.

  2. #2
    .........
    Join Date
    Nov 2002
    Posts
    303
    Code:
    printf("%d", N);

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Accessing syscalls from C
    By lilcoder in forum C Programming
    Replies: 17
    Last Post: 09-19-2007, 02:27 PM
  2. FAQ: Directional Keys - Useing in Console
    By RoD in forum FAQ Board
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM
  3. macro (#define) question
    By Darrok in forum C++ Programming
    Replies: 30
    Last Post: 12-20-2001, 05:01 PM
  4. My graphics library
    By stupid_mutt in forum C Programming
    Replies: 3
    Last Post: 11-26-2001, 06:05 PM