On Wednesday 27 August 2003 09:27 am,
Robert.Wultsch@asu.edu wrote:
> Howdy. I am using a debian unstable based on knoppix. To answer one person:
> rob@fearlesslaptop:~$ locate iostream.h
> /usr/include/c++/3.2/backward/iostream.h
> rob@fearlesslaptop:~$ find /usr/include/ -name iostream.h
> /usr/include/c++/3.2/backward/iostream.h
>
> To answer another I have been using both:
> rob@fearlesslaptop:~$ gcc as1.h -o as1
>
> g++ as1.h -a as1
>
> Why would they change the header styles? And why would msft not change
> their software with the time?
It doesn't matter where the header files are. gcc/g++ will automatically find
all of the header files it is supposed to find.
gcc will NOT automatically find any C++ header files (like iostream) but g++
will.
The header style was changed to conform with the C++ standard. I'm not 100%
of the reasoning behind the change, though.
You can access the system headers either with or without the .h in both g++
and MSVC++. g++ gets progressively more strict about C++ compliance as each
version is released, though, so it's harder to go the non-standard route. As
somebody mentioned, if you *really* need to keep the .h (and I don't know why
you would unless you are also compiling the code on a very old compiler), you
can enable it with newer g++ with -Wno-deprecated