原文的传送:I don’t want to see another “using namespace xxx;” in a header file ever again 转自 http://blog.csdn.net/pleasecallmewhy/article/details/8528702 在这里,我毫不回避地说了这句话. 作为一个开发者/团队领导者,我经常会去招聘新的项目成员,有时候也帮助其他组的人来面试应聘者.作为应聘流程之一,我经常要求应聘者写一些代码,因此我检查过相当多的
1.CPP文件中的内容 #include "mytest.h" #include <iostream> using namespace std; int add(const int a, const int b) { cout << "a=" << a << endl; cout << "b=" << b << endl; return (a + b); } 2.