+ 2
Do we have to use using namespace std if we have written end1 in the code?
5 odpowiedzi
+ 3
yes
if you want to use it without using namespace std ,
std::cout<<"Hello"<<std::endl;
or just use \n instead
std::cout<<"Hello\n";
+ 3
Osama Samir
[not to distract, this is just trivia]
endl is a stream manipulator* and also flushes the output buffer.
\n is just a replaced special character and does not flush.
* http://www.cplusplus.com/reference/iostream/manipulators
* http://www.cplusplus.com/reference/ostream/endl/
+ 2
Thanks Kirk Schafer that is a new information to me
+ 1
I assume that you're taking about endl (end line ) not end1( end one ) !
yes , you can do without
It just make new line
Edit:
look at Kirk Schafer comment
0
Is there any need to write end1? without that also we can execute the program..