LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   C++ Header files missing (https://www.linuxquestions.org/questions/linux-newbie-8/c-header-files-missing-747785/)

virtualsaum 08-15-2009 01:11 PM

C++ Header files missing
 
Hi guys,
Recently i typed a C++ prg. When i compiled it gave alot of errors but the first two errors were
"iostream.h:No such file or directory" and
"fstream.h:No such file or directory".

I doing a little bit of fielhandling in the program. I think the remaining errors are due lack of these files. I have alreaady installed gcc,g++ and build-essential. Still i am getting these errors.
Please help.......
Thanks in advance.......

brianL 08-15-2009 01:37 PM

Aren't C++ headers just iostream and fstream without the .h?

Mara 08-15-2009 01:40 PM

New GCC (which is in the recent distros) doesn't have iostream.h and so on. Only iostream is available.

wshackle 08-15-2009 01:40 PM

You either need to install an old version of g++ (g++-4.1 seems to work)
or use <iostream> and <fstream> instead of <iostream.h> and <fstream.h>

Apparently the .h versions were deprecated and later removed entirely.

-- Will


All times are GMT -5. The time now is 03:55 AM.