0

why we use using namespace std;

13th Jul 2016, 3:52 PM
id id
id id - avatar
2 odpowiedzi
+ 1
in the most simple form using namespace std; means just resolving scope of the objects in the standard library of C++ like cout or cin more simply it's just saying the compiler that "I'm using the objects of the standard library" if you won't use that line the when doing the output you'll write, std::cout<<"Hello world"; instead of cout<<"Hello world"; you'll learn about it in the latter parts of the Tutorial
13th Jul 2016, 4:02 PM
Vedant Patadia
Vedant Patadia - avatar
0
to declare namespace if you won't write it, you need to write functions of iostream library like std::cout, std::cin etc.
13th Jul 2016, 4:01 PM
Yakov Krainov
Yakov Krainov - avatar