[Solved] Warning: using directive refers to implicitly-defined namespace ‘std’

Error: main.cpp: warning: using directive refers to implicitly-defined namespace ‘std’

If you see the following error when trying to compile a C++ application:

 

main.cpp: : : warning: using directive refers to implicitly-defined namespace 'std'

then that means you do not have any header file inclusion that uses std namespace.

You can fix this warning by including a C++ header file that uses a std namespace otherwise the compile will not know about std namespace.

How to Solve this Error:

Very simple, just include a c++ header file, as follows:

#include <iostream>

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *