When I add an inclusion protector to my header file for a Visual C ++ project, it gives me the following warning and error:
warning C4603: '_MAPTEST_H': macro not defined or definition different after using precompiled header
Add macro to precompiled header instead of definition here
. \ MapTest.cpp (6): use of a precompiled header ** // precompiled header stdafx.h is included in this line
. \ MapTest.cpp (186): fatal error C1020: unexpected #endif
but when I add a precompiled header before the defender is turned on, no warnings or errors occur. What is the reason for this?
source
share