Click here to Skip to main content
15,923,168 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Visual Studio file associations Pin
Ryan Binns1-Jul-03 2:27
Ryan Binns1-Jul-03 2:27 
GeneralGetObjectsForNativeVariants Pin
vikramlinux1-Jul-03 1:26
vikramlinux1-Jul-03 1:26 
GeneralProblem with serialization. Pin
Svin1-Jul-03 1:13
Svin1-Jul-03 1:13 
GeneralRe: Problem with serialization. Pin
Nuehli1-Jul-03 1:43
Nuehli1-Jul-03 1:43 
GeneralRe: Problem with serialization. Pin
Svin1-Jul-03 2:20
Svin1-Jul-03 2:20 
GeneralRe: Problem with serialization. Pin
Nuehli1-Jul-03 2:44
Nuehli1-Jul-03 2:44 
GeneralRe: Problem with serialization. Pin
Svin1-Jul-03 2:56
Svin1-Jul-03 2:56 
QuestionHow to use multiple #if defined ? Pin
Bjarne Jørgensen1-Jul-03 0:53
Bjarne Jørgensen1-Jul-03 0:53 
Hi
I had a line like this:
<br />
#if defined _CIP || (_STANDALONE && (_KA || _UDV)) || _OTN9<br />
        <include something><br />
#endif<br />



One of these defines are no longer needed so I changed it into:

<br />
#if defined (_STANDALONE && (_KA || _UDV)) || _OTN9<br />
        <include something><br />
#endif<br />


But this gives a warning / error

aaa.cpp(288) : warning C4004: incorrect construction after 'defined'
aaa.cpp(288) : fatal error C1012: unmatched parenthesis : missing '('


But I'm beginning to suspect it should have been
<br />
#if (defined _STANDALONE && (defined _KA || defined _UDV)) || defined _OTN9<br />

instead


This gives no compiler warnings / errors



What I want is to include some lines if one of the following combination are true
_STANDALONE && _KA
_STANDALONE && _UDV
_OTN9


Would this changes how things would be handled in the preprocessor stage ?

Remark:
I don't use #define to define these, but using "preproccesor settings" under "project settings" , that is the /D switch

Using VC6
AnswerRe: How to use multiple #if defined ? Pin
Ryan Binns1-Jul-03 2:19
Ryan Binns1-Jul-03 2:19 
GeneralRe: How to use multiple #if defined ? Pin
Bjarne Jørgensen1-Jul-03 2:40
Bjarne Jørgensen1-Jul-03 2:40 
GeneralRe: How to use multiple #if defined ? Pin
Ryan Binns1-Jul-03 3:25
Ryan Binns1-Jul-03 3:25 
Generalcombo box problem Pin
si_691-Jul-03 0:49
si_691-Jul-03 0:49 
GeneralRe: combo box problem Pin
User 66581-Jul-03 1:26
User 66581-Jul-03 1:26 
GeneralRe: combo box problem Pin
vikramlinux1-Jul-03 1:47
vikramlinux1-Jul-03 1:47 
GeneralProblem with printing of bitmap pattern with CBrush Pin
Muhammad Kamran1-Jul-03 0:48
Muhammad Kamran1-Jul-03 0:48 
GeneralRe: Problem with printing of bitmap pattern with CBrush Pin
basementman1-Jul-03 5:24
basementman1-Jul-03 5:24 
GeneralDeleting Files. Pin
Saty1-Jul-03 0:23
Saty1-Jul-03 0:23 
GeneralRe: Deleting Files. Pin
Ravi Bhavnani1-Jul-03 3:20
professionalRavi Bhavnani1-Jul-03 3:20 
GeneralRe: Deleting Files. Pin
basementman1-Jul-03 5:35
basementman1-Jul-03 5:35 
GeneralStarting .exe... Pin
macmac381-Jul-03 0:06
macmac381-Jul-03 0:06 
GeneralRe: Starting .exe... Pin
User 66581-Jul-03 0:15
User 66581-Jul-03 0:15 
GeneralRe: Starting .exe... Pin
Ryan Binns1-Jul-03 0:17
Ryan Binns1-Jul-03 0:17 
GeneralRe: Starting .exe... Pin
Dominik Reichl1-Jul-03 0:18
Dominik Reichl1-Jul-03 0:18 
GeneralRe: Starting .exe... Pin
macmac381-Jul-03 1:12
macmac381-Jul-03 1:12 
GeneralRe: Starting .exe... Pin
User 66581-Jul-03 1:16
User 66581-Jul-03 1:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.