I have this trivial program:
#include <iostream>
#include <string>
int main(void)
{
const string s = "Hello, world!";
std::cout << s << endl;
return 0;
}
It compiles okay. However, if I #include <string> first and <iostream> second,
I get the following error from gcc:
In file included from c:/djgpp/lang/cxx/stl_alloc.h:57,
from c:/djgpp/lang/cxx/alloc.h:21,
from c:/djgpp/lang/cxx/std/bastring.h:39,
from c:/djgpp/lang/cxx/string:6,
from hello.cpp:1:
c:/djgpp/include/stdlib.h:16: warning: `NULL' redefined
c:/djgpp/lang/cxx/libio.h:88: warning: this is the location of the previous defi
nition
What is wrong? Am I alone or can someone else reproduce the result? I'm
running DJGPP 2.01 on NT 4.0 SP3.
Thanks.