LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
Search this Thread
Old 08-15-2009, 01:11 PM   #1
virtualsaum
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
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 6,861
Blog Entries: 51

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

Rep: Reputation: 148Reputation: 148
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
wshackle
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
 
  


Reply


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


All times are GMT -5. The time now is 04:18 AM.

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