> What is different between #include<iostream> and #include "stdio.h"?
You should have a space between #include and <iostream>. I'm not sure that
should matter, but it might (since you didn't elaborate on "fail").
Several differences:
1. #include <file> and #include "file" both search for and insert the
contents of the named file. using "file" will result in the directory where
the #include occurs being searched followed by the directories on the
include path, while using <file> will search only the directories on the
include path.
2. <iostream> is the header for the C++ standard stream classes, while
"stdio.h" (or more properly, <stdio.h>) is the header for the C standard I/O
functions and types.
> Why I always failed when I used the word #include<iostream> in Visual
> C++.NET 2003, but I succeeded when I added the word #include
> "stdio.h"?
You'd have to elaborate on "failed". Failed how? What error message(s)
appeared?
-cd
you forgot dot h
write
#include<iostream.h>
the different:
in iostream you have the c++ stream input/output library
in stdio you have the c standart input/output library
you can read it in the on line MSDN
> What is different between #include<iostream> and #include "stdio.h"?
> Why I always failed when I used the word #include<iostream> in Visual
> C++.NET 2003, but I succeeded when I added the word #include "stdio.h"?
Carl Daniel [VC++ MVP] - 01 Jul 2005 22:18 GMT
> you forgot dot h
> write
[quoted text clipped - 3 lines]
> in stdio you have the c standart input/output library
> you can read it in the on line MSDN
<iostream.h> is obsolete and no longer supported (as of VC++ 7.1).
<iostream> is correct for standard-compliant C++.
-cd