+ 2
Can we execute a program without using namespace std and return?
4 Respostas
+ 3
Of course ! If you remove "using namespace std;" you'll just have to put std:: before objects contained in it like that :
std::cout<<"Hello world!"<<std::endl;
if you omit the return 0 statement, it will just be put by default so yes you can forgot to write it but it will still be there in the end.
+ 1
@Baptiste
Exactly. Moreover, some programmers say that using std:: is better than "using namespace std. Hope im not wrong...
+ 1
Yes @Ledio, this is to avoid overriding that can occur (bringing error as it is not permitted in C++ if I am not wrong) because of two objects with the same name in two different namespace.
0
Std::cout<<
Std::cin>>