Skip to main content
GameDev.net gamedev.net
🔒 Locked

Namespace...?

Started by _elmo Jan 28, 2003 at 3:49 PM 2 replies 800+ views
Original Post
_elmo
_elmo
In c++, what is the meaning of namespace... When and why do you need to use it? _elmo nieuwe schoenen...
elmo
CpMan
CpMan
A namespace is a grouping mechanism often used to reduce the likelyhood of naming conflicts. You can also do neat things like alias namespaces. Consider this:


void foo() {}
class bar { bar() {} };
namespace FooBar {
void foo() {}
class bar { bar() {} };
}


In this example, the function and class inside the namespace are different from the function and class outside. There are no naming conflicts. This comes in handy with large libraries.



Gamedev for learning.
libGDN for putting it all together.
An opensource, cross platform, cross API game development library.
VSEDebug Visual Studio.NET Add-In. Enhances debugging in ways never thought possible.
_elmo
_elmo
Thanx for the explanation... it''s clear for me now!!!

_elmo nieuwe schoenen
elmo

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.