prog.cpp:11:9: error: expected ‘;’ at end of member declaration
double Point operator%(pt);
^
prog.cpp:11:25: error: ‘pt’ has not been declared
double Point operator%(pt);
^
prog.cpp:11:27: error: ISO C++ forbids declaration of ‘operator%’ with no type [-fpermissive]
double Point operator%(pt);
^
prog.cpp:13:25: error: declaration of ‘operator%’ as non-function
double Point::operator%(Point pt){
^
prog.cpp:13:31: error: expected primary-expression before ‘pt’
double Point::operator%(Point pt){
^
prog.cpp: In function ‘int main()’:
prog.cpp:25:11: error: redeclaration of ‘Point pt1’
Point pt1(20,20);
^
prog.cpp:18:8: error: ‘Point pt1’ previously declared here
Point pt1,pt2;
^
prog.cpp:26:11: error: redeclaration of ‘Point pt2’
Point pt2(24,23);
^
prog.cpp:18:12: error: ‘Point pt2’ previously declared here
Point pt1,pt2;
^
prog.cpp:27:36: error: no match for ‘operator%’ (operand types are ‘Point’ and ‘Point’)
cout<<"расстояние "<<pt1%pt2;
^
prog.cpp:27:36: note: candidate is:
prog.cpp:11:15: note: int Point::operator%(int)
double Point operator%(pt);
^
prog.cpp:11:15: note: no known conversion for argument 1 from ‘Point’ to ‘int’