I am trying a my first useful object oriented program with some namespace usage.
I have a base class B which is in the namespace NS. If I try to inherit from this
base class to get the inheritance work, I should use the NS::B in the class decleration as below, is this really the case? Or is there a more widely accepted sytle for this inheritance syntax?
namespace NS
{
class D: public NS::B{
...
};
}
Best,
Umut
If your
Dis innamespace NS, you don’t have to qualifyNS::B, sinceDandBare in the same namespace. You can just useclass D : public B.