Consider a pair of two source files: an interface declaration file (*.h or *.hpp) and its implementation file (*.cpp).
Let the
The clearest is the option you didn't show:
int MyNamespace::MyClass::foo()
{
// ...
}
It's also very verbose; too much so for most people. Since using
namespace is a recepe for name conflicts, at least in my experience,
and should be avoided except in very limited scopes and places, I
generally use your #2.