0
Why namespace std is used...??
4 Respuestas
+ 4
If you are reference by the line
using namespace std;
is really simple
look this example below
std::cout << "Why use std" << std::endl;
This is what you need to type to print without namespace std.
With namespace std.
this happens
cout << "Why use namepace std" << endl;
In most simple and non formal way it's like you are giving a nickname to make code more readeble.
0
Can you show code where it is used? Or explain your question more detailed please. By the way, you can lear more about namespaces.
0
So you can avoid this...
std::cout
std::cin
std::string
Lots more,you could omit it if you want..
0
easier for students to keep up with a lesson taught.
but it is considered a bad practice using it for bigger programs.
btw, 'using namespace' is just a way to shorten your code.