Im working on a simple class program which creates coordinate points and calculates the distance between the points. i keep getting an error when i try to calculate the distance.
thanks for the help
// the code
half1 = pow((EndPoint.GetXCoordinate()-Startpoint.GetXCoordinate(),2));
half2 = pow((EndPoint.GetYCoordinate()-Startpoint.GetYCoordinate(),2));
Length = sqrt[half1 + half2];
//and the error messages
/usr/include/bits/mathcalls.h: In function ‘void CalcDistance(Point, Point, Point)’:
/usr/include/bits/mathcalls.h:154: error: too few arguments to function ‘double pow(double, double)’
hw6.cpp:13: error: at this point in file
/usr/include/bits/mathcalls.h:154: error: too few arguments to function ‘double pow(double, double)’
hw6.cpp:14: error: at this point in file
hw6.cpp:19: error: invalid types ‘double ()(double)throw ()[double]’ for array subscript