always "using namespace std"?
This question already has an answer here:
There is no "cstring type of string". The <cstring>
header contains no string class, only functions (and the size_t
type and the NULL
macro). In your example, string
would just be considered std::string
.
As for using namespace
. I usually just use it in a very small scope, such as inside of function bodies. Never in header files!
上一篇: 抓取A元素的href属性
下一篇: 总是“使用命名空间标准”?