D
David Green
Ok, i'm a real c n00b but i needed a piece of code for some work i was
doing. Initially i was running the stuff under linux and using gcc to
compile the c code and it worked fine but now i need to port it to
windows and when i try to compile the same code with the visual studio
command line tool "cl" i get this error:
const.c(92) : error C2099: initializer is not a constant
const.c(97) : error C2099: initializer is not a constant
with the relevant lines of the const.c code being:
ln 92 double INFINITY = 1.0/0.0; /* 99e999; */
ln 97 double NAN = 1.0/0.0 - 1.0/0.0;
Now i have no real idea what this is doing so i was wondering why i
compiles fine uner gcc but not under windows, oh the command i am
using is:
cl /c const.c
Is there a compile option i need to set or will i have to change the
code?
Any help would be great, thanx.
Dave.
doing. Initially i was running the stuff under linux and using gcc to
compile the c code and it worked fine but now i need to port it to
windows and when i try to compile the same code with the visual studio
command line tool "cl" i get this error:
const.c(92) : error C2099: initializer is not a constant
const.c(97) : error C2099: initializer is not a constant
with the relevant lines of the const.c code being:
ln 92 double INFINITY = 1.0/0.0; /* 99e999; */
ln 97 double NAN = 1.0/0.0 - 1.0/0.0;
Now i have no real idea what this is doing so i was wondering why i
compiles fine uner gcc but not under windows, oh the command i am
using is:
cl /c const.c
Is there a compile option i need to set or will i have to change the
code?
Any help would be great, thanx.
Dave.