Right now I'm learning arduino denmilanove and our class was assigned to run this exact code below me. The 5 people around me all entered this exact code and got it to work however, when I run it (on 3 different computers) it has given me the same error in the same spot. That being "float SumOfNumbers = FloatAddTwoNumbers(A,B);". Any help would be greatly appreciated.
The point of this code is to do a simple float summation.
void setup()
{
Serial.begin(9600);
float A=1.1;
float B=1.2;
float SumOfNumbers = FloatAddTwoNumbers(A,B);
Serial.print("Sum = ");
Serial.println(SumOfNumbers,DEC);
}
void loop()
{
}
float FloatAddTwoNumbers(float X, float Y);
{
float Sum = X + Y;
return Sum;
}
Error messages:
in function void setup()
floataddtwonumbers is not declared in this scope
at global scope:
error: unexpected unquantified-id before '{' token