IT 취미생활.  
Front Page
Tag | Location | Media | Guestbook | Admin   
 
Compiler Error C2099

Error Message

initializer is not a constant

This error is issued only by the C compiler and occurs only for non-automatic variables. The compiler initializes non-automatic variables at the start of the program and the values they are initialized with must be constant.

Example

The following sample generates C2099.

// C2099.c
int j;
int *p;
j = *p; // C2099 *p is not a constant

C2099 can also occur because the compiler is not able to perform constant folding on an expression under /fp:strict because the floating point precision environment settings (see _controlfp_s for more information) may differ from compile to run time.

When constant folding fails, the compiler invokes dynamic initialization, which is not allowed in C.

To resolve this error, compile the module as a .cpp file or simplify the expression.

For more information, see /fp (Specify Floating-Point Behavior).

The following sample generates C2099.

// C2099_2.c
// compile with: /fp:strict /c
float X = 2.0 - 1.0;   // C2099
float X2 = 1.0;   // OK


Also See - C/C++ Build Errors

http://msdn.microsoft.com/en-us/library/8x5x43k7(VS.80).aspx



BLOG main image
취미생활
 Notice
 Category
분류 전체보기 (190)
매일매일갱생 (82)
서버개발 (1)
임베디드개발 (12)
Programming (80)
Personal Projects (6)
유용한 프로그램 (0)
 TAGS
퇴사 알고리즘 Linux Brazil C Dshow 개발자 English Algorithm Windows Mobile6.0 DirectShow Debug 티스토리초대 티스토리 초대장 warning M480 C++ DVB 미라지폰 debugging 벨소리 변경 1seg isdbt 영어 이메일 ISDB-T Java 군대 project english email It 음식 MP3 Error Case spam mail VC++ Wince5.0 출장 DVB-T 서태지
 Calendar
«   2025/11   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
 Recent Entries
 Recent Comments
 Recent Trackbacks
 Archive
 Link Site
zextor
괴짜 프로그래머의 일상사~@@
Gag & Peace, and more..
Kazakhstan Almaty.......
Min-A
Sadgarret
Steve Yoon's log
가슴 뛰는 삶을 살아라
오스틴 파워
GUI sin
melanie parker_Lady
제레미의 TV 2.0 이야기..
 Visitor Statistics
Total :
Today :
Yesterday :
rss