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



David Christensen wrote:
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?

No. The problem is that C++ has changed significantly over the
years. You are operating from obsolete documentation. The new names
for the header files no longer contain a .h on the end.

Try compiling this program instead.

#include <iostream>
int main ()
{
std::cout << "hello, world!" << std::endl;
return 0;
}

Bob

Attachment: signature.asc
Description: Digital signature



Relevant Pages

  • Little program
    ... is not compiling. ... int main { ... It's probably something really silly, or I am missing something, which ... but all in the quest to learn C!!!! ...
    (comp.lang.c)
  • Re: Desktop Collaboration
    ... > projects related to desktop development into a single project, ... the ability to select to include KDE and Gnome ... > binaries, libraries, etc. to make those packages run, in addition to ... a choise exists when compiling a program. ...
    (alt.os.linux)
  • Re: Getting started with FreeBSD
    ... complaining about compiling stuff, but you probably used ... You can get it going by installing the `bin' collection of packages from ... You can always install portsnap and portupgrade. ... The second tool can upgrade your installed `ports and packages', ...
    (freebsd-questions)
  • Re: Controlling the linking of shared libraries
    ... I'm talking about compiling the shared ... I'm writing this with my Fedora packager hat on. ... packages that the Fedora project distributes. ... The Fedora project recently decided to start using a linker option called ...
    (comp.lang.ada)
  • Re: compiling
    ... > applications of interest do not have RPM packages. ... while compiling the latest kernel with gcc 3.3). ... run old games in dosbox without the installation installing old libraries in ... libraries, ldconfig, and configure as well as some C mostly ...
    (alt.linux)