Namespace | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Namespace

What is the use of ' using namespace std '

1st Feb 2017, 12:10 AM
AmierAiman 47
AmierAiman 47 - avatar
2 Answers
+ 8
It makes your code more simple to read and write. std is a namespace used for c++ objects that are defined in standard libraries that you include at top of your code, when you write #include <iostream> and etc. Without writing "using namespace std;", you would need to write "std::" in front of every c++ standard object. For example, std::cout, std::cin, std::string, std::endl and so on
1st Feb 2017, 1:32 AM
Eligijus Silkartas
Eligijus Silkartas - avatar
- 1
Thanks
1st Feb 2017, 11:11 AM
AmierAiman 47
AmierAiman 47 - avatar