Hello
I am familiar with using scope resolution operator to define classes, but
why does it turn up elsewhere?
thanks
A few I can think of:
(1) to call a static member function
(2) to namespace-qualify something (e.g. std::cout << "hello" << std::endl; )
(3) to explicitly call a base class member function instead of a derived class
override, e.g.
class Base { public: virtual void foo(); .... }
class Derived : public Base {
public:
virtual void foo() {
Base::foo();
// do other stuff
}
};
(4) to provide visibility for otherwise hidden methods via using (see the FAQ)
e.g.
class Base { public: void foo();
}
class Derived {
public:
void foo(int ); // hides base class version
using Base::foo; // make it visible
};
that's all I can think of off the top of my head, but there could well be
others I've left out.
Cheers,