Archived

This topic is now archived and is closed to further replies.

Solstice

C++ Namespaces

Recommended Posts

Let''s say I have multiple classes each in their own source and header, and I want them all in the same namespace, how would I do that? -Solstice deninet.com aeris.deninet.com "...I was given three choices, the earth, the stars, or..."

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
namespaces can be closed and opend again in multiple files like this:

// 1.h
namespace Foo {
// stuff
}

// 1.cpp
namespace Foo {
// stuff
}

// 2.h
namespace Foo {
// stuff
}

// 2.cpp
namespace Foo {
// stuff
}

hope that helps

Share this post


Link to post
Share on other sites