What is the use of "using namespace std;" in CPP? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 2

What is the use of "using namespace std;" in CPP?

#include<iostream.h> using namespace std;

29th Apr 2017, 3:03 AM
Yishnu Pramanik
Yishnu Pramanik - avatar
2 ответов
+ 5
see namespaces. if you dont want to type std::cout std::endl etc you specify you want to use the "namespace std (standard)" that way you just type cout and endl instead if you know you are only going to be using a few things from the standard namespace you can just specify them using std::endl; using std::cout;
29th Apr 2017, 3:09 AM
jay
jay - avatar