Skip to main content
gamedev.net
🔒 Locked

Namespace question

Started by all_names_taken Jun 1, 2006 at 5:29 AM 1 replies 600+ views
Original Post
all_names_taken
all_names_taken
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"?
moeron
moeron
"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.
moe.ron

Topic Locked

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

Sign in to reply to this topic.