Hi and thanks for reading.
I purchased a small interpolation class from www.codecogs.com (really good site, by the way) and wanted to use the interpolation class in my little project.
I am running into problems and have been struggling a bit.
I'm simplifying things, but here goes:
I have a base class called "force" a derived class called "myForce" and the math class from codecogs called "Cubic".
Base class:
Code:class Force { protected: Maths::Interpolation::Cubic m_cubic; public: Force(); }; Force::Force() { }Code:class myForce: public Force { public: SpringForce(); };With this code the compiler tells me that there are no appropriate default constructor available for the Cubic class. Fair enough. Can someone explain to me how does constructor of the aggregate class object (Cubic, in this case) is called?Code:class Cubic { public: Cubic(int n, double *x, double *y); private: int m_n; double *m_x, *m_y, *m_b, *m_c, *m_d; }
I'm having a hard time understanding the relationship between base class constructor (that I omitted), and the constructor for the member data m_cubic that is part of the Force class.
If anyone has a simple example I'd be much grateful!!
Andre.