Thread overview
Problems with iostream.h (bugs?)
Dec 25, 2001
Alexis Golzman
Dec 25, 2001
Walter
Problems with iostream.h solved.
Dec 26, 2001
Alexis Golzman
December 25, 2001
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
Error: C:\PROGTOOLS\DM\BIN\..\include\iostream.h(470): 'istream::operator
>>' is already defined
Fatal Error: C:\PROGTOOLS\DM\BIN\..\include\iostream.h(518): too many errors
Lines Processed: 599  Errors: 5  Warnings: 0
Build failed

What am I doing wrong?

I'm using version 8.25 of the compiler. I used the DOS Executable options.

Thanks in advance for your help.

Season's Greetings,
Alexis.
http://www.RestYourEyes.com


December 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'
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
> Error: C:\PROGTOOLS\DM\BIN\..\include\iostream.h(470): 'istream::operator
> >>' is already defined
> Fatal Error: C:\PROGTOOLS\DM\BIN\..\include\iostream.h(518): too many
errors
> Lines Processed: 599  Errors: 5  Warnings: 0
> Build failed
>
> What am I doing wrong?
>
> I'm using version 8.25 of the compiler. I used the DOS Executable options.
>
> Thanks in advance for your help.
>
> Season's Greetings,
> Alexis.
> http://www.RestYourEyes.com
>
>


December 26, 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