There are at least two options:
- Put the definition in the header file and include this header file in all the source files where you need the definition
- Use the parameter
/Dfor the compiler to define the macro (this can also be set in the project properties under C / C ++ → Preprocessor → Preprocessor Definitions )
source
share