- 1

why we use ...using namspace ??

24th Jul 2016, 5:53 PM
Himanshu Joshi
Himanshu Joshi - avatar
5 Answers
+ 3
Assuming you mean namespace std, std is the STanarD libary, which allow you to use a wide range of different functions in that libary, such as cout, cin and endl. If we did not include namespace std, we would have to use the namespace name and a scope operator in order to access any function in that namespace. std::cout
24th Jul 2016, 8:22 PM
Cohen Creber
Cohen Creber - avatar
+ 3
I thought course and cin we're imported with #include<iostream>
25th Jul 2016, 5:19 AM
Eli Brown
Eli Brown - avatar
0
but i have run cout statment without namespace std
24th Jul 2016, 8:32 PM
Himanshu Joshi
Himanshu Joshi - avatar
0
You couldn't have, cout is part of the standard libary. Only way this would be true is if your compiler just automatically assigns things like cout and cin to std.
24th Jul 2016, 8:44 PM
Cohen Creber
Cohen Creber - avatar
0
for executing cout and cin
25th Jul 2016, 12:57 PM
Subramanian Thiagarajan
Subramanian Thiagarajan - avatar