One plausible method is by using using N::A
to load the class A
to the global namespace. And then you can use the Eclipse CDT's find and replace feature to edit out all the N::A
occurrences to A
.
You can either place using N::A
only in the files where you want the class to be in the global namespace or else you can define it at the end of the class's header file so that it will automatically be defined in every file which includes the class. Using it this way means that only the A
class gets dumped to the global namespace whereas using using namespace N;
dumps every single content of that namespace to the global namespace.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…