r/cpp
cross-posted from: https://lemmy.ml/post/70930
I am learning C++ and in my book using namespace std is written in every program. I understand that std::cout <<"hello"; can be simply written as cout << "hello"; by using namespace std. Why?
I am learning C++ and in my book using namespace std is written in every program. I understand that std::cout <<"hello"; can be simply written as cout << "hello"; by using namespace std.
using namespace std
std::cout <<"hello";
cout << "hello";
Why?