Why "using namespace std ;" is used in c++ please help me iam beginner to c++. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why "using namespace std ;" is used in c++ please help me iam beginner to c++.

C++

17th Oct 2020, 7:17 AM
BALAKUMAR N
BALAKUMAR N - avatar
2 Answers
+ 3
it just namespace.. so that u dont have to write "std::cout", "std::endl"
17th Oct 2020, 7:18 AM
durian
durian - avatar
0
Namespaces are used to organize code into logical groups and prevent naming collisions while including multiple library headers. For example suppose you include a header containing a function named strcpy().But there already exists a function strcpy() in the <string> header of std namespace .so you have to define a namespace e.g xyz:: strcpy () to prevent errors
17th Oct 2020, 12:56 PM
Aditya rout
Aditya rout - avatar