Ask coding questions

← Back to all posts
Why do people manually type std in C++?
AtriDey (189)

Why not simply say

using namespace std;

and omit the std::? For example,

std::cout<<"Hello World!"<<endl;

rather than

using namespace std;


cout<<"Hello World!"<<endl;

Is there a benefit I don't know of?

MrEconomical (2293)

I would write a reply but this one is way better than anything I could write