using namespace std;
in all my source files?
using namespace std - g++ command switch
is there any way to tell g++ to compile all files, using a certain namespace? so that i dont have to type
You shouldn't want to since it will cause portability problems with any compiler lacking such a feature, it's also a great way to confuse readers of your code.
However it can be done by placing the using directive in a header and letting the preprocessor include it automatically in all source files.
However it can be done by placing the using directive in a header and letting the preprocessor include it automatically in all source files.
// namespace.husing namespace std;
cc -include namespace.h ...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement