[Help] Celsius To Fahrenheit
Hello everyone,
I just started learning C++ and I was trying to make a Celsius To Fahrenheit converter, but I got an error.
Here's the code:
So what's wrong with this?
The error said: error C3861: 'temp': identifier not found
Thanks..
I just started learning C++ and I was trying to make a Celsius To Fahrenheit converter, but I got an error.
Here's the code:
Code:
#include <iostream>
using namespace std;
int main()
{
double C;
cout << "Enter your degrees in celsius: ";
cin >> C;
temp(C);
cout << "Done!";
cin.get();
cin.get();
return 0;
}
void temp(double ctemp)
{
double F = ctemp * 1.8 + 32;
cout << ctemp << " Celsius = " << F << "Fahrenheit.";
}
The error said: error C3861: 'temp': identifier not found
Thanks..
