[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: g++ linker error



Sean Johnson wrote:

> really? I've always had to do #include<iostream.h> ... as when I try
> #include<iostream> it fusses about not being able to find iostream.

If you use '#include<iostream>', you must also use 'namespace std;' at the
end of the includes block.

> Would you (or somebody else, for that matter) mind elaborating on why one
> would be more correct than the other?

I can't comment on the correctness, but namespace std is the new standard.
New compilers support .h headers as a backward compatibility feature.

> Wichert Akkerman wrote:
> 
> > Previously Nugzar Nebieridze wrote:
> > > That test program did not compile because the guy wrote
> > >
> > > #include <iostream>
> > >
> > > instead of
> > >
> > > #include <iostream.h>
> >
> > That's silly, #include <iostream> is correct. If you need iostream.h
> > there is something wrote with your C++ environment.
> >
> > Wichert.
> >
> >
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 
> 
---end quoted text---

-- 
Regards,
Steve

Debian GNU/Linux Because software support is free, timely,
                 useful, technically accurate, and friendly.
                 Reboots are for kernel and hardware upgrades.


Reply to: