Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - Problems with iostream.h (bugs?)
Hi, I'm trying to compile this little program: #include <iostream.h> void main() { cout << "Hello World!\n"; } But I get the following errors: sc test.cpp -cpp -Ae -Ju -ms -o+time -3 -a2 -c -I. -otest.obj Error: C:\PROGTOOLS\DM\BIN\..\include\iostream.h(443): 'istream::getline' is already defined Error: C:\PROGTOOLS\DM\BIN\..\include\iostream.h(452): 'istream::get' is already defined Error: C:\PROGTOOLS\DM\BIN\..\include\iostream.h(468): 'istream::operator' is already defined Dec 25 2001
The problem is -Ju. -Ju is for old K&R C programs, it causes char overloading in C++ to fail. -Walter "Alexis Golzman" <agolzman ciudad.com.ar> wrote in message news:a09hk1$217r$1 digitaldaemon.com...Hi, I'm trying to compile this little program: #include <iostream.h> void main() { cout << "Hello World!\n"; } But I get the following errors: sc test.cpp -cpp -Ae -Ju -ms -o+time -3 -a2 -c -I. -otest.obj Error: C:\PROGTOOLS\DM\BIN\..\include\iostream.h(443): 'istream::getline' Dec 25 2001
Now I changed the option to -J (chars are unsigned) and it works OK. Thanks! Alexis. | The problem is -Ju. -Ju is for old K&R C programs, it causes char | overloading in C++ to fail. -Walter Dec 26 2001
|