+ 1

What is the signification of : using namespace std ; ???? Plz

28th Nov 2016, 11:49 AM
five stars
5 Answers
+ 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
28th Nov 2016, 11:54 AM
Maciej Tracz
Maciej Tracz - avatar
+ 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.";
29th Nov 2016, 2:56 AM
SAKET upadhyay
SAKET upadhyay - avatar
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
29th Nov 2016, 9:35 AM
Bingcheng45
Bingcheng45 - avatar
0
makes life easier
29th Nov 2016, 9:44 PM
Lance Talban
Lance Talban - avatar
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.
30th Nov 2016, 8:27 PM
Blood
Blood - avatar