Risk of using namespace std;

There is a risk in declaring namespace std with the using function. It will be a conflict later on when using multiple libraries. There might be conflicting functions in the libraries that interacts with the code differently.

Yes the idea is that 2 imported libraries could use the same “method” like cout to do something and your program won’t be able to tell which one should use.

Privacy & Terms