Should I use using namespace std;
?
I saw some posts saying that using namespaces is a bad practice. So I just want to clarify this.
#include<iostream>
using namespace std;
int main()
{
cout<<"Hello World"<<endl;
return 0;
}
Or should I keep going like this
#include<iostream>
int main()
{
std::cout<<"Hello World"<<std::endl;
return 0;
}
Also please elaborate the reason.