+ 1
What is the signification of : using namespace std ; ???? Plz
5 Respostas
+ 3
it's not obligatory to use but it saves little time in writing simple programs. Without it whenever you would use cout or cin you must write std::cout and std::cin
+ 1
it is used to declare how much arbitrary leniar space allocation is required for all operations as default..
it is not needed in some of the compilers like TCWin but Linux based compilers may require it like G++ , code blocks etc.
also saves time , as without this you may have to declare space allocation at the start of the identifier
eg.. std::cout<<"This is the example.";
0
Instead of using std::cout everytime u want to use functions from the standard library, by using namespace std; u can use cout instead of std::cout
0
makes life easier
0
You can also do:
using std::cout;
using std::cin;
etc.
using namespace std;
will make all your commands use that standard library unless declared otherwise. This method can put you at risk for naming collisions, so i would not recommend it for large programs, but it does make things easier.