Function was not declared in scope

float getVoltage(int pin) //TMP36
{
return (analogRead(pin) * 0.004882814);

}

This function is not define correctly.

It must be outside of other code.