Erik Hofman writes:
 > David Megginson wrote:

 > > I agree strongly on namespaces -- they'll eliminate some of our MSVC
 > > conflicts as well, especially if people avoid using global #defines
 > > whenever possible.  Do all of our target compilers now support them?
 > 
 > 
 > Please correct me if I'm wrong, but to my understanding namespaces are 
 > like classes but without the overloading and such?

You're wrong.  C++ namespaces are pretty-much exactly the same as Java
packages -- they avoid naming conflicts by partitioning names.  That
way, you can have

class std::Foo
class fgfs::Foo
class simgear::Foo
class plib::Foo

without any naming conflict.  You simply state which one you're using
at the top of the file, or add the package name explicitly, i.e.

  using fgfs::Foo;

  Foo myFoo;
  simgear::Foo anotherFoo;


All the best,


David

-- 
David Megginson
[EMAIL PROTECTED]


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to