Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-15-2009, 01:11 PM   #1
LQ Newbie
Registered: Jun 2009
Posts: 3

Rep: Reputation: 0
Question 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.......
Old 08-15-2009, 01:37 PM   #2
LQ 5k Club
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 15.0
Posts: 8,110
Blog Entries: 61

Rep: Reputation: Disabled
Aren't C++ headers just iostream and fstream without the .h?
Old 08-15-2009, 01:40 PM   #3
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
New GCC (which is in the recent distros) doesn't have iostream.h and so on. Only iostream is available.
Old 08-15-2009, 01:40 PM   #4
LQ Newbie
Registered: May 2008
Posts: 6

Rep: Reputation: 0
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
missing header files sagitalk Programming 3 01-27-2009 08:49 AM
missing header files on kubuntu 7.04 guardian_shadow Linux - Newbie 4 08-12-2007 04:23 PM
missing header files and vmware trscookie Linux - Software 7 03-13-2007 04:10 AM
Qt4 missing header files SPo2 Programming 2 01-20-2007 04:36 PM
Missing C header files? kushalkoolwal Programming 3 11-07-2005 04:52 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:41 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration