Jump to content
  • Advertisement
Sign in to follow this  
all_names_taken

Namespace question

This topic is 4525 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

If I write using namespace blah; in one .h-file and include that file in another file, does that give the effect of having "using namespace blah;" within that second file, or does the parser behave as if the second file doesn't contain any "using namespace blah"?

Share this post


Link to post
Share on other sites
Advertisement
"using" will apply to everything in its scope. So if you have that statement globally in a header file then it will apply to everything that includes it. Thats why you should keep things like that in the most specific scope possible.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!