namespace??
Title
Question
what is the importance of "using namespace std" in the c++ programming cod???\r\n
C-and-Cpp First-Cpp-Program 01-02 min 30-40 sec
Answers:
The standard C++ library functions like cin, cout etc are defined in std namespace.
"using namespace std" tells the compiler that we will be using functions from std namespace.
If we don't write this statement, we may still write the program but will need to specify "std::" before any function that we are using from std namespace. Like, "std::cout" instead of directly "cout".
Login to add comment