Article ID: 116170 - Last Review: July 5, 2005 - Revision: 1.1 FIX: C2099 Generated Initializing Struct with MacroThis article was previously published under Q116170 On This PageSYMPTOMS
Using a macro to initialize a structure causes the C/C++ compiler to
incorrectly generate the following error message:
error C2099: initializer is not a constant
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was corrected in Microsoft Visual C++ version 6.0. MORE INFORMATION
The sample code below can be used to reproduce this problem:
Sample CodeAPPLIES TO
| Article Translations
|

Back to the top
