Я считаю, что-то вроде этого должно работать:
CObj(Cpoint pt = CPoint(10,10), float x = 10.0f, int n = 10);
Редактировать: Мне кажется, это работает:
#include <iostream>
struct CPoint {
int x, y;
CPoint(int x_, int y_) : x(x_), y(y_) {}
};
class CObj {
CPoint p;
public:
CObj(CPoint pt = CPoint(10,10), float x = 10.0f, int n = 10) : p(pt) {
std::cout << "x.x = " << p.x << "\tx.y = " << p.y << std::endl;
}
};
int main() {
CObj x;
return 0;
}
Результат:
x.x = 10 x.y = 10