문제

Please how to define preprocessor directive _VARIADIC_MAX=10 from C++ code? For now I set it in Property Page -> C/C++ -> Preprocessor -> Definitions but I need it in each project. Will be cool to define it one time in some common.h file and use in every project by including such header.

도움이 되었습니까?

해결책

You can do it like this:

#define _VARIADIC_MAX 10 

다른 팁

You can add this definition for current user throught user property sheet: Open one of your project, select View -> Property Manager. Then open property Microsoft.Cpp.Win32.user, and add your constant like earler (Common Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions). Save and restart visual studio.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top