I have declared a class X in X.h as follows:
namespace Foo {
class X{
....
};
}
In X.cc I would like to define the constructors, methods for X.
Do I need to enclose all my definitions inside namespace Foo {...}
or prefix X as Foo::X:: for every method ?
It seems that sometimes I can just say (using namespace Foo) and not mention it again, i.e. just define methods as X::X() {...}
What is the correct approach here ?