Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / July 2005

Tip: Looking for answers? Try searching our database.

I'm a beginner

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jason Felix - 01 Jul 2005 17:04 GMT
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 17:53 GMT
> 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
unicorn - 01 Jul 2005 22:08 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.