0
is it necessary to include using namespace std
6 Réponses
+ 5
No, but if you dont, every single object that is inside the std namespace need to have std:: before it.
Example:
#include <iostream>
using namespace std;
...
cout<<1; // Fine
...
----------------
#include <iostream>
...
std::cout<<1; // Fine, but needs to have std:: at the beginning
If you have a lot of cout statements, using the std namespace is good.
0
thank you
0
yes it is necessary
0
well said learned friends
0
yaa
0
can we use #include <iostream.h>