473,659 Members | 2,582 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_warnin g.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 1183
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_warnin g.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
5028
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
2653
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 it differently. FOUR QUESTIONS: The background: I got three (3) files
3
3076
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 before rowID answID qryrow questionID datafield 1591 12 06e 06e 06e question 1593 12 06f 06f 06f question 1594 12 answer to the question 06f
10
3418
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 database or continue to process on to the next page. I am now trying to learn ASP to see if we can replace some of our applications that were written in php with an ASP alternative. However, after doing many searches on google and reading a couple...
3
1365
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. Has anyone had any luck configuring this to work with vb.net? -Peter
10
2374
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, and if so how? Public Class Form1 Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code "
1
3719
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) class library and type in the following code below: #include <map> #include<string>
4
1189
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. Some error likes the following shown. Any suggestion?
13
2073
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 entire inventory. I have what I think is the correct code but it's not working. Help is greatly appreciated class Inventory3 { public static final int MAXIMUM_ITEMS = 4; private static Product product = new Product; public static void...
0
8428
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8341
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8751
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4176
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4342
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2759
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.