is STD inside <iostream>? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

is STD inside <iostream>?

Is the std namespace inside the <iostream> header file? I wonder what other types of namespaces are inside there

28th Nov 2020, 9:33 PM
Carlos Galvez
Carlos Galvez - avatar
2 Answers
+ 3
Here are the sacred texts, at least in the case of gcc: https://github.com/gcc-mirror/gcc/blob/master/libstdc++-v3/include/std/iostream
28th Nov 2020, 10:20 PM
Dennis
Dennis - avatar
+ 2
Namespaces don't have to be contiguous, i.e you can have two header files which both add functions/classes/namespaces etc without a redefinition error. A lot of built in header files in C++ put everything inside the std namespace. So no, everything that's in std isn't defined only inside the iostream header. Only the iostream part of the std namespace.
29th Nov 2020, 2:06 AM
inxanedev!
inxanedev! - avatar