Debian 6.0.3 i386 - g++ hello.cpp - error: iostream.h: No such file or directory



debian-user:

I'm attempting to compile C++ "hello, world!" on Debian 6.0.3 i386 and seem to be missing iostream.h (?). libstdc++6 seems to be installed (?). Do I need one of these packages?


http://packages.debian.org/search?searchon=contents&keywords=iostream.h&mode=path&suite=stable&arch=i386


Please see console session, below.

Any suggestions?


TIA,

David



2011-12-21 17:30:10 dpchrist@p43400e ~/sandbox/cpp
$ g++ hello.cpp
hello.cpp:1:22: error: iostream.h: No such file or directory
hello.cpp:3: error: '::main' must return 'int'
hello.cpp: In function 'int main()':
hello.cpp:5: error: 'cout' is not a member of 'std'

2011-12-21 17:30:11 dpchrist@p43400e ~/sandbox/cpp
$ cat hello.cpp
#include <iostream.h>
using namespace std;
void main ()
{
std::cout << "hello, world!";
}

2011-12-21 17:30:18 dpchrist@p43400e ~/sandbox/cpp
$ cat /etc/debian_version
6.0.3

2011-12-21 17:30:26 dpchrist@p43400e ~/sandbox/cpp
$ g++ --version
g++ (Debian 4.4.5-8) 4.4.5
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


2011-12-21 17:30:30 dpchrist@p43400e ~/sandbox/cpp
$ sudo apt-get install libstdc++6-4.4-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libstdc++6-4.4-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 21 not upgraded.



--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: http://lists.debian.org/4EF289A7.4080901@xxxxxxxxxxxxxxxx