Archived

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

Solstice

C++ Namespaces

Recommended Posts

Solstice    122
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   
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
Solstice    122
Thanx!!!

-Solstice

deninet.com
aeris.deninet.com

"...I was given three choices, the earth, the stars, or..."

Edited by - Solstice on February 7, 2002 9:50:41 PM

Share this post


Link to post
Share on other sites