When should I use namespaces?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

When should I use namespaces?

Post by MasterGod »

I have now the filters in the VC project and folders to separate classes.
I don't know if I should also separate classes in code with namespaces or should I leave it as it is now?

Thanks.
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
fireside
Posts: 158
Joined: Thu Dec 01, 2005 10:55 pm

Post by fireside »

Namespaces are used to prevent name collisions. You probably don't need to worry about that. Sometimes it's necessary, but do you really want to keep writing namespace::something every time you use it? If you use:using namespace whatever; you've pretty much nullified it.
Post Reply