0 Members and 2 Guests are viewing this topic.
It is a namespace like std. Use using namespace sf; if it bothers you.
Quote from: nwp on January 04, 2014, 01:39:46 amIt is a namespace like std. Use using namespace sf; if it bothers you.Never use "using namespace" for any namespace. It is widely considered bad practice due to causing namespace collisions and the fact that the namespace clarifies where a function/class/etc is coming from, making code a bit easier to understand and making it easier to find the proper documentation for a function/class/etc.
Quote from: OniLinkPlus on January 04, 2014, 02:08:42 amQuote from: nwp on January 04, 2014, 01:39:46 amIt is a namespace like std. Use using namespace sf; if it bothers you.Never use "using namespace" for any namespace. It is widely considered bad practice due to causing namespace collisions and the fact that the namespace clarifies where a function/class/etc is coming from, making code a bit easier to understand and making it easier to find the proper documentation for a function/class/etc.Don't say never. You can use "using namespace" in a scoped block which can be advantageous. What you really don't want to do is use a namespace outside of a scoped block, such as in the global space of a header file. You can read here (http://stackoverflow.com/questions/223021/whats-the-scope-of-the-using-declaration-in-c) for more ideas.