How do I use the #if directive

#define String1 1
#define String2 3

#if X == String1
#   include "String1.h"
#elif X == String2
#   include "String2.h"
#else
//no header file to include

#endif

my question is the "X" variable (macro) in #if X... Is X local to this file and is it looking for the macros String1 or String2 to be non 0 value I am a little fuzzy on pre-compiler directives



from Recent Questions - Stack Overflow https://ift.tt/3uvRsnR
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Hibernate Search - Elasticsearch with JSON manipulation

Spring Elasticsearch Operations