Question

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.

Was it helpful?

Solution

You can do it like this:

#define _VARIADIC_MAX 10 

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top