c++.dos.32-bits - Initialization external variable
- ZaitcevE.V. (12/12) Oct 18 2001 How correctly to initialize external variable?
- Walter (3/15) Oct 19 2001 Your code is correct C++, but not correct C. Try using the -cpp flag to ...
How correctly to initialize external variable?
For example code (test1.c):
const int axx = 3;
int b = axx;
void
main(void)
{
}
At compilation: sc test1.c -c -mx
There is a mistake:
test1.c(2) : Error: constant initializer expected
--- errorlevel 1
Oct 18 2001
Your code is correct C++, but not correct C. Try using the -cpp flag to tell
the compiler it is C++. -Walter
ZaitcevE.V. wrote in message <9qoejg$42v$1 digitaldaemon.com>...
How correctly to initialize external variable?
For example code (test1.c):
const int axx = 3;
int b = axx;
void
main(void)
{
}
At compilation: sc test1.c -c -mx
There is a mistake:
test1.c(2) : Error: constant initializer expected
--- errorlevel 1
Oct 19 2001








"Walter" <walter digitalmars.com>