struct point {
int x; int y;
point(int a, int b) {
x = a;
y = b;
}
int sum = x + y;
};
class circle {
public:
point p;
double r;
circle(point a, double b) {
p = a;
r = b;
}
//circle(point a, double b) : p(a), r(b) {}; //no error
};
错误消息说"类点没有默认构造函数"出现在圆形构造函数中。为什么需要默认的构造函数?