+ 1
What is "using namespace std" in c++
2 Antworten
+ 7
C++ std is the standard namespace where features of the C++ Standard Library, such as string or vector or int are declared.
So by saying "using namespace std" you are instructing the c++ compiler where to find the constructs defined in the header files you include (eg: iostream)
If you don't write it, when the compiler sees string or vector or int it will not know what you are referring to and you will get a compile error.