### Functions Problem

Hi, I'm getting the following errors and I don't know what they mean.
`Error 1 error LNK2019: unresolved external symbol "double __cdecl CelciusToFahrenheit(double)" (?CelciusToFahrenheit@@YANN@Z) referenced in function "void __cdecl DisplayConversions(double,double,int,double)" (?DisplayConversions@@YAXNNHN@Z)`

`Error 2 error LNK1120: 1 unresolved externals `

Here is my code.

 ``123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159`` ``````#include #include using namespace std; //prototypes int GetConversionMethod(int method); int GetTemperatureRange(int range); void DisplayConversions(double temp, double temp2, int method, double interval); double FahrenheitToCelcius(double temp); double CelciusToFahrenheit(double temp); void main() { char again; double temp, temp2, interval=1; //set up decimal points cout.setf(ios::fixed, ios::floatfield); cout.setf(ios::showpoint); cout<>temp; temp2=temp; }//end if if (range==2) { cout<<"Enter the first temperature: "; cin>>temp; cout<<"Enter the second temperature: "; cin>>temp2; cout<<"Enter the interval you wish Temperatures to increase by: "; cin>>interval; }//end if DisplayConversions(temp, temp2, method, interval); cout<"; cin>>again; cout<>method; }//end while return method; }//end GetConversionMethod int GetTemperatureRange(int range) /* this function asks if they would like to convert a single value or a range. It will repeat untill they enter 1 or 2. Pre: none Post: Will return if they want a range or not back to main */ { while (range !=1 && range !=2) { cout<<"Do you want to convert 1. A single value or 2. A range of values: "; cin>>range; }//end while return range; }//end GetTemperatureRange void DisplayConversions(double temp, double temp2, int method, double interval) /* This function displays the conversions in a table. It will also switch the two temperatures so that temp is less than temp2. It also calculates the temperatures using a while loop, displaying them each line. Pre:the temp, temp2 method and interval all need to be entered. Post: Upon completion, the program will display the converted temperatures. */ { double temp3; if (method==1) cout<<" Celcius Fahrenheit"<
Last edited on
Line 149

 `` `` ``double CelciustoFahrenheit(double temp)``

Doesn't match the prototype on line 10

 `` `` ``double CelciusToFahrenheit(double temp);``

You need to capitalize the 't'
OK so it runs now but when I choose a single value I get an infinite loop
Topic archived. No new replies allowed.