From 41c3fc2919adefebc948c000710599e3fda55711 Mon Sep 17 00:00:00 2001 From: maulikaluthra <56387512+maulikaluthra@users.noreply.github.com> Date: Tue, 20 Oct 2020 18:40:59 +0530 Subject: [PATCH] Update hello.cpp using namespace std --- 1-hello-world/hello.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/1-hello-world/hello.cpp b/1-hello-world/hello.cpp index 95b5145..725f19c 100644 --- a/1-hello-world/hello.cpp +++ b/1-hello-world/hello.cpp @@ -1,8 +1,16 @@ #include +using namespace std; + +//“using namespace std” means we use the namespace named std. “std” is an abbreviation for standard. +//If we don’t want to use this line of code, we can use the things in this namespace like this. std::cout, std::endl. +//If this namespace is not used, then computer finds for the cout, cin and endl etc.. Computer cannot identify those and therefore it throws errors. + + + int main() { - std::cout << "Hello World!\n"; + cout << "Hello World!\n"; return 0;