質問

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