0

[DUPLICATE] Namespace

What is the purpose of “using namespace std”?

7th Jan 2018, 3:10 PM
Alan
Alan - avatar
2 Answers
+ 4
To be able to use the definitions from it, without specifying the namespace explicitly. So instead of: std::string s("text"); std::cout << s << std::endl; You're able to write: using namespace std; string s("text"); cout << s << endl;
7th Jan 2018, 3:20 PM
deFault