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

namespace

what is namespace std?

8th Jun 2019, 7:38 AM
Periyakaruppan Nagappan
Periyakaruppan Nagappan - avatar
5 Answers
+ 6
A namespace is a collection of libraries. In the namespace std all standard methods like cin and cout are gathered. Using namespaces avoids naming conflicts https://www.learncpp.com/cpp-tutorial/naming-conflicts-and-the-std-namespace/ Comment out "#using namespace std" and discover which library functions have gone missing
8th Jun 2019, 10:53 AM
sneeze
sneeze - avatar
+ 4
If you remove "using namespace std;" after #include <iostream>, then you should use #iostream content, such as cin, cout, string and endl as std::cin, std::cout, std::string and std::endl.
8th Jun 2019, 11:23 AM
Seb TheS
Seb TheS - avatar
+ 2
Imagine physically You want to select a book with a specific theme from a library If you know the shelf you want, you can access that book faster NAMESPACE Specifies what bookshelf you are considering in <iostream> library To make your program run faster
30th May 2021, 8:35 AM
Roozbeh Kh
Roozbeh Kh - avatar
0
Hi I want learn a brograming and I dont nown from where started can you help me please.
6th Jan 2021, 2:06 PM
مرتضى حيدر المرزوكي
0
C++
12th Sep 2021, 5:55 AM
Arren Gagaza