# need parse help

• 01-20-2002
joe
need parse help
i made a code and tried to compile it but it shows up with an error saying "parse before '='. this is the statement that it says is wrong: fahrenhiet = factor * celsius/100 + 32;
wut do they meen by parse before '='? wut should i do?

Opps! sorry for the confusion. here's the whole code:

//
//Program to convert temerature
//units in joe
//Fahrenhiet = Celsius * (212 - 32)/100 +32
//

#include <iostream.h>

int main(int nNumberofArgs, char* pszArgs[])
{
//enter the temperature in celsius
int celsius;
cout << "Enter the temperature in Celcius:";
cin >> celsius;

//calculate conversion factor for celsius
//to Fahrenhiet
int factor;
factor = 212-32;

//use conversion factor to conver celsius
//into Fahrenhiet values
int fahrenhiet;
fahrenhiet = factor * celsius/100 + 32;

//output the results
cout << "Fahrenhiet value is:";
cout << fahrenhiet;

return 0;
}
• 01-20-2002
golfinguy4
a little code would help!! :D
• 01-20-2002
Uraldor
the only thing i can help you with, considering you didn't really give the code that we needed to see.. is that the formula for converting between the 2 is:

f = 9 * c / 5 + 32;

and

c = (f - 32) * 5 / 9;

:D
• 01-20-2002
taylorguitarman
A parse error is usually due to an error made in the previous code, things like missing semi-colons, or missing braces, etc. Go to the error line and move up through the code looking for that kind of stuff.