r.setCoordinates(nz.getx(), ny.gety());
|
|
main.cpp|92|error: no matching function for call to ‘Point::setCoordinates(double, double)’| main.cpp|92|note: candidate is:| main.cpp|33|note: void Point::setCoordinates(double&, double&)| main.cpp|33|note: no known conversion for argument 1 from ‘double’ to ‘double&’| |
||=== Build: Debug in testcpp (compiler: GNU GCC Compiler) ===| main.cpp||In constructor ‘Point::Point()’:| main.cpp|17|warning: ‘Point::x’ should be initialized in the member initialization list [-Weffc++]| main.cpp|17|warning: ‘Point::y’ should be initialized in the member initialization list [-Weffc++]| main.cpp||In member function ‘double Point::getDistance(double, double, double, double)’:| main.cpp|41|error: ‘sqrt’ was not declared in this scope| main.cpp|45|error: ‘rectangle’ does not name a type| main.cpp||In constructor ‘Rectangle::Rectangle(Point, Point, Point)’:| main.cpp|68|warning: ‘Rectangle::x’ should be initialized in the member initialization list [-Weffc++]| main.cpp|68|warning: ‘Rectangle::y’ should be initialized in the member initialization list [-Weffc++]| main.cpp|68|warning: ‘Rectangle::z’ should be initialized in the member initialization list [-Weffc++]| main.cpp|68|warning: ‘Rectangle::r’ should be initialized in the member initialization list [-Weffc++]| main.cpp|68|warning: ‘Rectangle::distanceXY’ should be initialized in the member initialization list [-Weffc++]| main.cpp|68|warning: ‘Rectangle::distanceYZ’ should be initialized in the member initialization list [-Weffc++]| main.cpp|68|warning: ‘Rectangle::distanceXZ’ should be initialized in the member initialization list [-Weffc++]| main.cpp|84|error: ‘sqrt’ was not declared in this scope| main.cpp|86|warning: comparing floating point with == or != is unsafe [-Wfloat-equal]| main.cpp|86|warning: comparing floating point with == or != is unsafe [-Wfloat-equal]| main.cpp|92|error: no matching function for call to ‘Point::setCoordinates(double, double)’| main.cpp|92|note: candidate is:| main.cpp|33|note: void Point::setCoordinates(double&, double&)| main.cpp|33|note: no known conversion for argument 1 from ‘double’ to ‘double&’| main.cpp||In member function ‘double Point::getDistance(double, double, double, double)’:| main.cpp|42|warning: control reaches end of non-void function [-Wreturn-type]| ||=== Build failed: 4 error(s), 12 warning(s) (0 minute(s), 0 second(s)) ===| |
const
.const
.Point::setCoordinates
function could also be a constructor - have both.main.cpp|86|warning: comparing floating point with == or != is unsafe [-Wfloat-equal]| main.cpp|86|warning: comparing floating point with == or != is unsafe [-Wfloat-equal]| |
double