+ 2
Why using namespace in C++
Namespace with C++
2 Antworten
+ 3
Because you get rid of writing std:: several times in the code.
+ 2
Namespace is used to prevent name conflict, and to neatly group things by their purpose or functional relativity (not to be mistaken with functional paradigm).
https://en.cppreference.com/w/cpp/language/namespace
https://www.w3schools.in/cplusplus-tutorial/namespace/