This is my source I got from a book I am trying to learn C++ with.
It does not compile the errors given are : E:\Projects\Conversion\conversion.cpp
[Warning] In function `int main(int, char **)':
and 13 E:\Projects\Conversion\conversion.cpp
no match for `_IO_istream_withassign & > int &'
Also I can't get the help up as devcpp.hlp file is missing. Is this normal if you have not bought the CD? or have I screwed up the install?
//
// Program to convert temperature from Celcius degree
// units to Fahrenheit dgree units:
// Fahrenheit = Celcius * (212 - 32) / 100 + 32
//
#include <stdio.h>
#include <iostream.h>
int main(int nNumberofArgs, char* pszArgs[])
{
// enter the temperature in Celcius
int nCelcius;
cout << "Enter the temperature in Celcius:";
cin > nCelcius;
// calculate conversion factor for celcius
// to Fahrenheit
int nFactor;
nFactor = 212 - 32;
// use nFactor to convert Celcius
// into Fahrenheit values
int nFahrenheit;
nFahrenheit = nFactor * nCelcius / 100 + 32;
// output results
cout << "Fahrenheit value is: ";
cout << nFahrenheit;
return 0;
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2002-09-05
Sorry I thought this was for users developing using Dev C++, I will repost in the right forum.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is my source I got from a book I am trying to learn C++ with.
It does not compile the errors given are : E:\Projects\Conversion\conversion.cpp
[Warning] In function `int main(int, char **)':
and 13 E:\Projects\Conversion\conversion.cpp
no match for `_IO_istream_withassign & > int &'
Also I can't get the help up as devcpp.hlp file is missing. Is this normal if you have not bought the CD? or have I screwed up the install?
//
// Program to convert temperature from Celcius degree
// units to Fahrenheit dgree units:
// Fahrenheit = Celcius * (212 - 32) / 100 + 32
//
#include <stdio.h>
#include <iostream.h>
int main(int nNumberofArgs, char* pszArgs[])
{
// enter the temperature in Celcius
int nCelcius;
cout << "Enter the temperature in Celcius:";
cin > nCelcius;
// calculate conversion factor for celcius
// to Fahrenheit
int nFactor;
nFactor = 212 - 32;
// use nFactor to convert Celcius
// into Fahrenheit values
int nFahrenheit;
nFahrenheit = nFactor * nCelcius / 100 + 32;
// output results
cout << "Fahrenheit value is: ";
cout << nFahrenheit;
return 0;
}
Sorry I thought this was for users developing using Dev C++, I will repost in the right forum.