IFDEF in if condition

Andrei Vlad

Is it possible to use #ifdef macro in a if condition like this?

if(Something() || SomethingElse() #ifdef __TEST__ || SomethingTest()#endif )
{
// Code Sequence
}
Jared Dykstra

Yes, just add some newlines. The #ifdef and #endif need to be on their own lines:

if(Something() || SomethingElse()
    #ifdef __TEST__
    || SomethingTest()
    #endif
    )
{
    // Code Sequence
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related