473,386 Members | 1,846 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,386 software developers and data experts.

complie question

hi when i try to compile this:

#include <iostream.h>

int main()
{
int i;
cout << "Please enter an integer value: ";
cin >> i;
cout << "the value you entered is " << i;
cout << " and its double is " << i*2 << ".\n";
return 0;
}

...with g++ i get the following:

In file included from /usr/include/c++/3.3/backward/iostream.h:31,
from returnInt.cpp:1:
/usr/include/c++/3.3/backward/backward_warning.h:32:2: warning:
#warning This file includes at least one deprecated or antiquated
header. Please consider using one of the 32 headers found in section
17.4.1.2 of the C++ standard. Examples include substituting the <X>
header for the <X.h> header for C++ includes, or <sstream> instead of
the deprecated header <strstream.h>. To disable this warning use
-Wno-deprecated.

my question here is this: is iostream.h depracated? Any thoughts on
this code you'd like to share?
thanks in advance for any replies! :)

howard

Sep 3 '05 #1
4 1165
ho**************@yahoo.com wrote:
hi when i try to compile this:

#include <iostream.h>

int main()
{
int i;
cout << "Please enter an integer value: ";
cin >> i;
cout << "the value you entered is " << i;
cout << " and its double is " << i*2 << ".\n";
return 0;
}

..with g++ i get the following:

In file included from /usr/include/c++/3.3/backward/iostream.h:31,
from returnInt.cpp:1:
/usr/include/c++/3.3/backward/backward_warning.h:32:2: warning:
#warning This file includes at least one deprecated or antiquated
header. Please consider using one of the 32 headers found in section
17.4.1.2 of the C++ standard. Examples include substituting the <X>
header for the <X.h> header for C++ includes, or <sstream> instead of
the deprecated header <strstream.h>. To disable this warning use
-Wno-deprecated.

my question here is this: is iostream.h depracated? Any thoughts on
this code you'd like to share?
thanks in advance for any replies! :)

howard


iostream.h is deprecated by g++, it is not and never has been a standard
C++ header.

Code is fine, but to avoid the warning use

#include <iostream>
using namespace std;

instead of

#include <iostream.h>

Note the lack of a .h in the correct name of the header file.

john
Sep 3 '05 #2
Thanks John, thats really helped me out.
It works just fine now :)

howard

Sep 3 '05 #3
Thanks John, thats really helped me out.
It works just fine now :)

howard

Sep 3 '05 #4
John Harrison wrote:
[..]
#include <iostream>
using namespace std;

instead of

#include <iostream.h>

Note the lack of a .h in the correct name of the header file.


It's not really 'the lack'. It's just 'absence'.
Sep 3 '05 #5

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

Similar topics

3
by: Stevey | last post by:
I have the following XML file... <?xml version="1.0"?> <animals> <animal> <name>Tiger</name> <questions> <question index="0">true</question> <question index="1">true</question> </questions>
7
by: nospam | last post by:
Ok, 3rd or is it the 4th time I have asked this question on Partial Types, so, since it seems to me that Partial Types is still in the design or development stages at Microsoft, I am going to ask...
3
by: Ekqvist Marko | last post by:
Hi, I have one Access database table including questions and answers. Now I need to give answer id automatically to questionID column. But I don't know how it is best (fastest) to do? table...
10
by: glenn | last post by:
I am use to programming in php and the way session and post vars are past from fields on one page through to the post page automatically where I can get to their values easily to write to a...
3
by: pmclinn | last post by:
I read this: http://www.devx.com/amd/Article/21313 And I wanted to try it out on my system. I'm running on windows xp64 and vs 2003. I want to complie some of my appz in 64 bit editions. ...
10
by: pmclinn | last post by:
Let's say I have the code below, and I want to complie this on a machine that does not have VS2003 installed on it, but does have the ..net framework... Is it possible to complie this code below,...
1
by: Maxwell | last post by:
Hello, I having having oodles of trouble using the std lib in my MC++ (VS.NET 2003) Class library. I figured out a simple sample to reproduce the errors I am having. Create a MC++ (VS.NET 2003)...
4
by: Benny Ng | last post by:
Dear All, Now my application is going to migrated into .NET v2. And it's already converted into v2 by Visual Studio 20005. (the auto convert tools) But when I goto compiled the application....
13
by: jcato77 | last post by:
I am having trouble figuring out my code and was hoping someone could point me in the right direction. Below is my code what I need to due is create a method to add and display the value of the...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...

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.