#include <iostream> and std relation | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

#include <iostream> and std relation

hi to all im beginner in c++ programming when I read some sources tell me std is name space which contain function cout or cin what is rule of #include <iostream> its called as header what relation exist between header and name space

26th May 2019, 12:50 AM
muhamad hardaniyan
muhamad hardaniyan - avatar
3 Answers
0
There is no direct relation between header file and namespace. A header file is file is a file containing the declaration of your functions/classes i.e. their signatures (interfaces) A namespace is mainly use to avoid name collision by grouping functions/classes of the same "group" under a common name std for the standard library, boost for boost, etc ...
26th May 2019, 4:30 AM
Paul
0
so classes and fucntion are parts of namespace i mean every name space has class and function? if so why we need header file ? becuse every time we can notice to class or functon by call it namespace still have problem in file header excusme im beginer
26th May 2019, 4:44 AM
muhamad hardaniyan
muhamad hardaniyan - avatar
0
i use code block can you tell me how to find property of header file with opening it in code block
26th May 2019, 4:47 AM
muhamad hardaniyan
muhamad hardaniyan - avatar