if(HidrostaticPressure < 0); //←Look at the last character
{
return -1;
}
//Equivalent to:
if(HidrostaticPressure < 0)
; //That way it is more obvious
return -1; //Braces makes no difference here
Although main() returns an int, that doesn't mean that the operating system will return the full integer value to calling process. On UNIX systems you really only get the least significant byte. Try returning 1 instead of -1.