hello,
I am a "out-of-the-box" programmer, and I hope I don't sound like a retard asking this question. I recently purchased "C++ for Dummies" and downloaded the most recent version of DJGPP. Everything installed correctly, and I tried the first program in the book. It's a simple Celsius to Fahrenheit conversion program.
Code:
//
// Program to convert temperature from Celsius degree
// units into Fahrenheit degree units:
// Fahrenheit = Celsius * (212 - 32)/100 + 32
//
#include <stdio.h>
#include <iostream.h>
int main(int nNumberofArgs, char* pszArgs[])
{
// enter the temperature in Celsius
int celsius;
cout << "Enter the temperature in Celsius:";
cin >> celsius;
// calculate conversion factor for Celsius
// to Fahrenheit
int fahrenheit;
factor = 212 - 32;
// use conversion factor to convert Celsius
// into Fahrenheit values
int fahrenheit;
fahrenheit = factor * celsius/100 + 32;
// output the results
cout << "Fahrenheit value is:";
cout << fahrenheit;
return 0;
}
When I try to compile with the Make function I get an error message like this.
Code:
Compiling; Conversion.cpp
c:\djgpp\lang\cxx\3.22\backward\iostream.h(31) In file included
from c:\djgpp\lang\cxx\3.22\backward\iostream.h: 31,
Coversion.cpp (7) from Coversion.c :7:
c:\djgpp\lang\cxx\3.22\backward\backward_warning.h (32)
Error: 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 the C++ includes, or <sstream> instead of the
deprecated header <strstream.h>. To disable this warning use
-Wno-deprecated
I'm pretty sure I don't want to disable warnings in RHIDE, but I don't have a clue what to do from here. I can't return the book because the seal (and the spine) has been broke on the book. I've tried search engines, other message boards, e-mails, and no one seems to know how to help. I am really looking forward to tackling this language, and any help provided would be much appreciated.
Thanx.