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
분류 전체보기 (191)
매일매일갱생 (83)
서버개발 (1)
임베디드개발 (12)
Programming (80)
Personal Projects (6)
유용한 프로그램 (0)
 TAGS
DVB VC++ 군대 MP3 Linux Java Brazil 미라지폰 서태지 warning 티스토리 초대장 퇴사 M480 Debug Algorithm DVB-T C++ It project 티스토리초대 spam mail Wince5.0 Dshow 개발자 C ISDB-T 출장 알고리즘 영어 이메일 Error Case 벨소리 변경 english email DirectShow 음식 debugging Windows Mobile6.0 isdbt 1seg English
 Calendar
«   2024/05   »
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 31
 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