Thread: return types
View Single Post
Old 12-28-2004, 11:24 PM   #13 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
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.
__________________
Valmont is offline   Reply With Quote