iostream and namespace

Hi!
what is the difference between using <iostream.h> and
1
2
<iostream>  
using namespace std;

Can you tell me where should i use the first one when the second one?
I'm using VC.6
Thanks!
Last edited on
The first one is VERY old, the second one is the standard.
VC 6 is old, see http://www.cplusplus.com/forum/articles/7263/
Download VisualStudio 2010 Express. It's pretty good.

Though I prefer Eclipse with g++.

Also, about the namespace, That has nothing to do with the header, iostream. It is a directing to use functions from the Std namespace, like cout, endl, cin, etc. Beware that this can cause conflicts with other namespaces that have things named the same as things from other namespaces... the safer way is to do something like std::cout << std::endl; calling things directly.

Also note that you will never see a namespace in C, since it is not OO.
Last edited on
Topic archived. No new replies allowed.