>1 namespaces?

What does it mean to use two namespaces at the same time? For instance, if I use

1
2
  using namespace cv;
  using namespace std;


how does the compiler resolve conflicts between function names in these namespaces?
It doesn't; if you use an unqualified function name and there are matching functions in both namespaces, compilation will stop.
Thanks? What's an unqualified function name? One that appears in both namespaces?
unqualified is one that doesn't have a :: before it. endl() is unqualified, so it will be looked up in all namespaces you pulled in with using declarations.
std::endl() and ::std::endl() are qualified, so they will only be looked up in the std namespace
Last edited on
Topic archived. No new replies allowed.