LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 10-01-2003, 10:32 AM   #1
qwijibow
Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
g++ why cant i #include \<iostream\> ???


hi.

im programming using g++ compiler.
in redhat 9.0

BUT, im having to include iostream.h
and other old headers, becuase my compiler complins there is no iostream .

but when i do use iostream.h the compiler tells me im using an out dated header and try knocking off the .h suffix, so i know my compiler supports them.

any ideas ?

is there a header package im missing ?
 
Old 10-01-2003, 11:02 AM   #2
qwijibow
Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Original Poster
Rep: Reputation: 47
oops,
forgot to useing namespace std
 
Old 10-02-2003, 05:46 PM   #3
jinksys
Member
 
Registered: Aug 2003
Location: 63123
Distribution: OpenSuSE/Ubuntu
Posts: 417

Rep: Reputation: 31
i think you already fixed it yourself...but...

make sure you..

#include <iostream>

and

namespace std;
 
Old 10-03-2003, 01:52 AM   #4
Xiangbuilder
Member
 
Registered: Apr 2003
Location: Shandong province China
Distribution: fedora core 1.0
Posts: 206

Rep: Reputation: 30
It could be said that
#include <iostream.h> equal to
#include <iostream>
using namespace std;
from the side.

Last edited by Xiangbuilder; 10-03-2003 at 01:54 AM.
 
Old 10-03-2003, 07:17 AM   #5
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 50
by Xiangbuilder
It could be said that
#include <iostream.h> equal to
#include <iostream>
using namespace std;
from the side.


nooooo, iostream.h is dramatically different from iostream internally, and it is depreciated, you shouldnt use any of the stream stuff ending with .h
 
  


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
my iostream.h include won't work slinky2004 Programming 5 09-20-2005 12:37 AM
where is iostream invisibleghost Programming 2 10-24-2004 01:30 PM
GCC:- 'cout' is an undeclared function when #include <iostream> is included? caesius_01 Programming 5 04-04-2004 11:00 AM
"#include <iostream.h>" does not compile ambuj Linux - Software 7 01-28-2004 08:56 AM
#include <iostream> ERROR alexrm1x Programming 9 03-14-2003 10:04 AM


All times are GMT -5. The time now is 09:46 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