Thread: ORe identifier: #ifndef ID_1 || ID_2 || ....

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    26

    ORe identifier: #ifndef ID_1 || ID_2 || ....

    Is it possible to ORe some identifiers with #ifdef or #ifndef?
    This does not work:
    #ifndef ID_1 || ID_2 || ....

  2. #2
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    Code:
    #if !(defined ID_1 || defined ID_2)
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  3. #3
    Registered User
    Join Date
    Oct 2005
    Posts
    26
    Thx for your help. But it just works this way:
    Code:
    #if (!defined ID_1 || !defined ID_2)
    mfg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Personal Program that is making me go wtf?
    By Submeg in forum C Programming
    Replies: 20
    Last Post: 06-27-2006, 12:13 AM
  2. process killer on a loop
    By Anddos in forum Windows Programming
    Replies: 8
    Last Post: 01-11-2006, 01:50 AM
  3. Why wont my function exit correctly?
    By LightsOut06 in forum C Programming
    Replies: 2
    Last Post: 10-09-2005, 09:23 PM
  4. Massive Function Problem
    By Marc Sharp in forum C Programming
    Replies: 10
    Last Post: 11-19-2003, 08:49 PM
  5. Tic Tac Toe Help
    By aresashura in forum C++ Programming
    Replies: 1
    Last Post: 11-21-2001, 12:52 PM