Quote:
|
Originally Posted by falsepride
so std is a namespace defined in iostream.h header file?
|
Very brave. I've asked you to draw your own conclusions and you did. That I appreciate!
The answer:
No. The otherway around:
iostream is defined within the namespace std;
namespace std
{
TONS OF SYSTEM STUFF IN HERE LIKE iostream, cmath, ios, fstream ETCETERA
}
But obviously this is devided systematically over a number of files. We call them header files.
That will come later.
A "namespace" is nothing else but a fancy name for grouping things.
This code is valid too, using {} to group things:
Code:
{ //Grouping starts here.
{
cout<<"hi"<<endl;
}
}//Grouping ends here.
Useless it seems, but it is valid.
This is by the way a trick to avoid certain bugs with certain compilers. But don't you worry about that. Just demonstrating.