Ordering of using namespace std; and includes?

前端 未结 6 937
眼角桃花
眼角桃花 2020-12-02 00:04

I recently saw this code being used in a source file in a C++ project:

using namespace std;
#include 

Ignoring all issues o

6条回答
  •  南笙
    南笙 (楼主)
    2020-12-02 00:30

    Recently i faced the same issue and been advised by my tech lead that; using namespace does not guarantee the visibility of the methods until the namespace with related methods are included in the file using .h file. including the header file resolved the issue.

提交回复
热议问题