double distance(point a,point b){} 这种写法对吗?参数是俩个对象前加类名

来源:学生作业学帮网 编辑:学帮网 时间:2024/05/07 19:55:54

double distance(point a,point b){} 这种写法对吗?参数是俩个对象前加类名

函数的定义没错,你可以把point理解为int也好char也好
double distance(int a, int b){}难道有错么?没错