Archived

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

C++ namespace insanity...

This topic is 4943 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

... it appears that you can't have two namespaces that have the same name, no matter if each of them are in seperate namespaces. Is this correct? EDIT: Never mind, it appears that Intellisense is just confused. [edited by - thedevdan on May 31, 2004 3:15:23 PM]

Share this post


Link to post
Share on other sites
I was not aware of this fact, and if I understand you right, I don''t think this is true. If you want to call a function defined in namespace A while in code defined as using namespace B, you need to use A::functionName()

Share this post


Link to post
Share on other sites
Well, I had:
namespace A{
namespace C{
}
namespace B{
namespace C{
}
}

Intellisense was messing up (it wasn''t detecting the innermost C from within B), but from outside of B it does fine.

Share this post


Link to post
Share on other sites