C++可以在多个头文件中重复定义同一名称的命名空间吗?
test_a.h中有定义:
namespace ns {
class a {...};
}
test_b.h中有定义:
namespace ns {
class b {...};
}
test_c.h中有定义:
namespace ns {
class c {...};
}
然后,在test_c.cpp中有如下代码片段:
#include "test_a.h"
#include "test_b.h...
转载
2019-08-21 18:12:44 ·
2932 阅读 ·
0 评论