Re: gcc not seeing.

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

 



On Thu, 2002-11-07 at 23:16, Michael Schwendt wrote:
> -----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;".
> 

Very true. The method chosen comes down to personal preference and how
protective you do or do not want to be when exposing components of the
namespace.

Regards

Philip Wyett

-- 

AIM: PhilipWyett
ICQ: 135463069
Email: philipwyett@dsl.pipex.com

--

Public key ID: 39018C68
Public key stored at: http://www.keyserver.net

--

Attachment: signature.asc
Description: This is a digitally signed message part


[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