473,394 Members | 1,787 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

I'm a beginner

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"?
Nov 17 '05 #1
5 1215
Jason Felix wrote:
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
Nov 17 '05 #2
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
"Jason Felix" wrote:
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"?

Nov 17 '05 #3
unicorn wrote:
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


<iostream.h> is obsolete and no longer supported (as of VC++ 7.1).
<iostream> is correct for standard-compliant C++.

-cd

Nov 17 '05 #4
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
"Jason Felix" wrote:
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"?

Nov 17 '05 #5
unicorn wrote:
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


<iostream.h> is obsolete and no longer supported (as of VC++ 7.1).
<iostream> is correct for standard-compliant C++.

-cd

Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Richard B. Kreckel | last post by:
Hi! I was recently asked what book to recommend for a beginner in C++. I am convinced that you needn't study C in depth before learning C++ (though it helps), but cannot find any beginner's...
8
by: Grrrbau | last post by:
I'm a beginner. I'm looking for a good C++ book. Someone told me about Lafore's "Object-Oriented Programming in C++". What do you think? Grrrbau
7
by: Rensjuh | last post by:
Hello, does someone have / know a good C++ tutorial for beginnners? I would prefer Dutch, but English is also fine. Hoi, heeft / kent iemand nog een goede C++ tutorial voor beginners? Het liefste...
27
by: MHoffman | last post by:
I am just learning to program, and hoping someone can help me with the following: for a simple calculator, a string is entered into a text box ... how do I prevent the user from entering a text...
18
by: mitchellpal | last post by:
Hi guys, am learning c as a beginner language and am finding it rough especially with pointers and data files. What do you think, am i being too pessimistic or thats how it happens for a beginner?...
20
by: weight gain 2000 | last post by:
Hello all! I'm looking for a very good book for an absolute beginner on VB.net or VB 2005 with emphasis on databases. What would you reccommend? Thanks!
5
by: macca | last post by:
Hi, I'm looking for a good book on PHP design patterns for a OOP beginner - Reccommendations please? Thanks Paul
10
by: Roman Zeilinger | last post by:
Hi I have a beginner question concerning fscanf. First I had a text file which just contained some hex numbers: 0C100012 0C100012 ....
10
by: hamza612 | last post by:
I want to start learning how to program. But I dont know where to start. From what I've heard so far c++ is not a good lang. to learn as a beginner because its very complicated compared to others...
22
by: ddg_linux | last post by:
I have been reading about and doing a lot of php code examples from books but now I find myself wanting to do something practical with some of the skills that I have learned. I am a beginner php...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.