using namespace std; is for? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

using namespace std; is for?

16th Sep 2016, 7:07 PM
Spencer Howard
Spencer Howard - avatar
6 Answers
+ 1
To not have to put std:: in front of every element from the standard libraries, for example std::cout.
16th Sep 2016, 7:59 PM
Zen
Zen - avatar
+ 1
It's to use the shorthand of the namespace
17th Sep 2016, 12:39 AM
LeParadoxHD | YouTube
LeParadoxHD | YouTube - avatar
0
this means that the spaces are standard
16th Sep 2016, 7:58 PM
David
David - avatar
0
but when I'm using turbo c++, the program works just fine without "using namespace std;" why is that? I don't place std:: in front of every element
16th Sep 2016, 8:02 PM
Spencer Howard
Spencer Howard - avatar
0
it's like Zen said: withou it you must write std::cout, with it you just write cout
16th Sep 2016, 11:18 PM
Artur Dębkowski
Artur Dębkowski - avatar
0
its actually standard c library which contain different kind of standard functions..
17th Sep 2016, 2:00 PM
Reyad Hossain
Reyad Hossain - avatar