What is the work of using namespace std??? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

What is the work of using namespace std???

why the program is showing error without using namespace std.according to my previous knowledge that is not required.

26th Sep 2018, 7:28 PM
bin
bin - avatar
1 Réponse
0
Almost all functions from the STL, such as cin and cout for example, are grouped together in the standard namespace. So if you stop including "namespace std", you have to precede all such functions with "std::", in order to indicate that they can be found in that namespace, otherwise the compiler cannot recognize them because it doesn't know where to look for them. If you didn't do that in your program, that is the error you are looking for, else it might be helpful to show the program to us.
26th Sep 2018, 7:44 PM
Shadow
Shadow - avatar