always "using namespace std"?

This question already has an answer here:

  • Why is “using namespace std” considered bad practice? 35 answers

  • 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!

    链接地址: http://www.djcxy.com/p/5064.html

    上一篇: 抓取A元素的href属性

    下一篇: 总是“使用命名空间标准”?