#if !CLOCK

This is a discussion on #if !CLOCK within the C Programming forums, part of the General Programming Boards category; Greetings. I'm a novice. what does the # sign in front of an if statement mean? I've got this: #if ...

  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    2

    #if !CLOCK

    Greetings. I'm a novice. what does the # sign in front of an if statement mean?

    I've got this:

    #if !CLOCK
    blah
    blah
    #else
    blah
    #endif

    Also, why aren't brackets and parenthesis needed?

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,652
    You are looking at preprocessing directives, so the rules are a little different.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Nov 2009
    Posts
    2
    thank you. I've been trying to track down the variable CLOCK because i thought if i found it it would lead me to the answer. But it is an elusive little variable

  4. #4
    Registered User slingerland3g's Avatar
    Join Date
    Jan 2008
    Location
    Seattle
    Posts
    602
    Check all your included header files as well.

  5. #5
    {Jaxom,Imriel,Liam}'s Dad Kennedy's Avatar
    Join Date
    Aug 2006
    Location
    Alabama
    Posts
    1,065
    And any Makefiles you have. Preprocessor commands don't have to have #defines, but can also have command line defines.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Logical Error in Clock program
    By SVXX in forum C++ Programming
    Replies: 0
    Last Post: 05-10-2009, 12:12 AM
  2. Outside influences on clock cycles? (clock_t)
    By rsgysel in forum C Programming
    Replies: 4
    Last Post: 01-08-2009, 05:15 PM
  3. Clock Troubles
    By _Nate_ in forum C Programming
    Replies: 22
    Last Post: 06-19-2008, 05:15 AM
  4. clock program
    By bazzano in forum C Programming
    Replies: 3
    Last Post: 03-30-2007, 10:12 PM
  5. using clock()
    By sl4nted in forum C Programming
    Replies: 8
    Last Post: 11-09-2006, 06:16 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21