+ 2
This is for what??
using namespace std;
5 odpowiedzi
+ 2
"using namespace std;"
Lets you use the commands in the "iostream" file without writing std:: in front of it.
Example WITH "using namespace std;":
cout << "Hello!";
WITHOUT "using namespace":
std::cout <<"Hello!";
You just get rid of the std:: part which is pretty handy when writing large code.
+ 2
all functions in the standard library are defined in the namespace std, if you don't write "using namespace std" you have to write std:: for every function you use from the standard library.
exp:
std::cout << "Hello World" << std::endl;
+ 1
In C++ the standard method are in std namespace. Without this statement, you can call standard method like "cout" or "cin" writing "std::cout" or "std::cin".
+ 1
tnx vry much
0
"using namespace std;"
why we are use this words? what is the mean?