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
VC++ 미라지폰 알고리즘 Dshow 출장 DVB-T Error Case 퇴사 군대 티스토리 초대장 C++ warning debugging DirectShow Brazil Algorithm 영어 이메일 english email MP3 isdbt Java 서태지 1seg English 벨소리 변경 Linux 티스토리초대 Windows Mobile6.0 spam mail C DVB ISDB-T It 개발자 M480 project Debug Wince5.0 음식
 Calendar
«   2025/10   »
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