Re: gcc not seeing.

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

 



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

On Thu, 7 Nov 2002 14:27:15 -0800, Jesse Keating wrote:

> # #include <iostream>
> # 
> # int main()
> # {
> #   std::cout << "Hello World\n";
> #   return 0;
> # }
> # 
> # As a sub note about the warning when including 'iostream.h'
> # languages change and evolve and thus with the evolution of C++
> # things are being deprecated. You also get a similar warning under
> # MSVC 7 .NET, if you include iostream.h.
> 
> Can you not define the namespace to std when using <iostream> ?  

Sure, but sometimes you don't want to see everything in that
namespace. And then you either specify the scope explicity with
std::cout or use "using std::cout;" at the beginning of the
file/block instead of the entire namespace with "using namespace
std;".

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

iD8DBQE9yvRP0iMVcrivHFQRAsCfAJ4p0fbgnjwmkjIY/eYbktEB+WlpQACeItfk
uzgSVNcfg/vFE3RO2EEbiYo=
=jgWC
-----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