Re: gcc not seeing.

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 07 Nov 2002 10:12:38 -0600, Thomas Dodd wrote:

> 
> 
> Mario Torre wrote:
> 
> >   std::cout << "Hello World\n";
> >//  ^^^
> >
> 
> Is that actuall in the standard? Is the default namespace no longer
> defined?

It is. It is.  Not a typo, the same answer to both questions. ;)

It depends on which headers you include. If you include the old *.h
C++ headers, e.g. <iostream.h>, cout is available in the global
namespace. But if you include the Standard C++ headers, e.g.
<iostream>, you need to access namespace std yourself.

With GCC 3 the old headers give a warning, btw.

> Time to start adding a namespace decleration to all my code..

- -- 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE9yrnT0iMVcrivHFQRAjFMAJ9Kf16pNNk6tHE083OsTNosQcF67QCeICB/
YpLTsAByO+Krg+YOZ/SJ5Ts=
=bfO9
-----END PGP SIGNATURE-----



-- 
Psyche-list mailing list
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux