+ 4

Why write using namespace std Even program execute without it and when we use it gives error please explain

12th Nov 2016, 1:16 AM
Mithun Verma
Mithun Verma - avatar
4 Antworten
+ 2
if you do not use the namespace you can do it like this std:cout<<"hello world"; with std you can only put cout
12th Nov 2016, 1:55 AM
Eduardo
Eduardo - avatar
+ 2
it depends. in turbo c we do not need to write using namespace std. but in dev c we need to mention it. but in dev c we should not write void before the main prog. eg. void main ( ) gives error main ( ) doesnot
12th Nov 2016, 6:42 AM
rakshya
- 1
how to program simple games
12th Nov 2016, 4:48 AM
rock pro programmer
- 3
If you use using namespace std; basicly means a time saver so you don't have the write std::cout every time. Or for anything that requires std::. So you can not use the namespace but you'll be writing a lot more code then you need too. Remember K.I.S.S. Keep it simple stupid.
12th Nov 2016, 3:26 AM
Myleek Chase
Myleek Chase - avatar