Answer the question
In order to leave comments, you need to log in
How to use #define to make a replacement in the header?
Let's say we have code:
//main.cpp
#define debug 1
#include "myHeader.h"
. . .
// myHeader.h
#if debug == 1
. . .
#else
. . .
#endif
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question