Is it wrong to use C++ 'using' keyword in a header file?

前端 未结 5 760
[愿得一人]
[愿得一人] 2020-12-19 00:28

I\'ve been told it\'s bad to have \"using namespace ns123\" in a header file, but I can\'t remember what the reason given was. Is it in fact a bad thing to do, and why?

5条回答
  •  南方客
    南方客 (楼主)
    2020-12-19 00:52

    It will often give you strange and mysterious compilation errors, for one thing, where you can spend hours trying to figure out the root of the problem.

提交回复
热议问题