“using namespace” in c++ headers

后端 未结 9 2192
失恋的感觉
失恋的感觉 2020-11-22 01:32

In all our c++ courses, all the teachers always put using namespace std; right after the #includes in their .h files. This seems to me

9条回答
  •  长发绾君心
    2020-11-22 02:03

    You are right. And any file should only include the headers needed by that file. As for "is doing things wrong common in real world projects?" - oh, yes!

提交回复
热议问题