+ 1
In where we really use this expression "using namespace std ; " in c++ ?
When we do programme in c++ we use the expression using namespace std . Which includes c++ standard library but in the code where we really use those features . And what wrong will happen if we don't write the expression " using namespace std ; " ? please give example for that . I couldn't get much by reading the lesson provided by sololearn 😞 about that expression (using namespace std ; ) . What that expression really does ? 😕
1 Antwort
+ 2
it imports everything from the std namespace making it so you don't have to write "std::string" or "std::cout" but rather "string" and "cout". in most small codes no problems will occur, but when you start dealing with multiple namespaces, clashing can occur.