C++ Namespaces

Started by
1 comment, last by Solstice 22 years, 2 months ago
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..."
-Solsticedeninet.comaeris.deninet.com"...I was given three choices, the earth, the stars, or..."
Advertisement
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
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
-Solsticedeninet.comaeris.deninet.com"...I was given three choices, the earth, the stars, or..."

This topic is closed to new replies.

Advertisement