PDA

View Full Version : [c++]how to install iostream.h



testuser01
April 24th, 2010, 02:05 PM
i installed c++ library by following command

sudo apt-get install libc6-dev

but my computer does not have iostream.h in following directory
/usr/include

let me know how to install iostream.h

_0R10N
April 24th, 2010, 04:36 PM
iostream.h is a pretty standard library, did you installed the build-essential package?? It comes with most of the standard libraries you'll need.

Kind regards!

_0R10N >>

srs5694
April 24th, 2010, 05:50 PM
On my Ubuntu 9.10 system, there is no standard iostream.h file; however, there is a standard iostream file (with no extension), installed in /usr/include/c++/4.4/. It's part of the libstdc++6-4.4-dev package.

jrothwell97
April 24th, 2010, 06:10 PM
^^what s/he said.

You should be topping your C++ files with:


// C++ header file include
#include <iostream>

It's not like C, where you have to do


/* Plain C header file include */
#include <stdio.h>

ibuclaw
April 24th, 2010, 08:27 PM
iostream.h is a deprecated header, and last time I checked (probably a year ago) was already removed in g++-4.3 and later releases.

Simply use:

#include <iostream>
instead.

Regards
Iain

km0r3
April 25th, 2010, 03:01 PM
iostream.h is a deprecated header, and last time I checked (probably a year ago) was already removed in g++-4.3 and later releases.

Simply use:

#include <iostream>instead.

Regards
Iain

Yes, I can assert that, too.

<iostream> and <iostream.h> are not the same. Also read here (http://www.devx.com/tips/Tip/14447).