You need to use an initialization list here, otherwise the default (parameterless) constructor will be invoked for all your date objects - and you don't have such a constructor. The appropitiate way to do this is:
i still have the same problem, but it move to :
Order::Order(Date check_in, Date check_out,int owner_id,int order_id) :
_check_in(check_in), _check_out(check_out), _owner_id(owner_id), _order_id(order_id), _num_of_nights((_check_out._year * 372) + (_check_out._month -1) * 31)
{ [Error: No Default constructor exists for class "Date" ]
Hanst, I be honest, that code hurts my eyes and there is nothing that stands out as being wrong. Maybe with more code, neatly formatted, it would be easier to see what is going on.
Aymanbah,
Please use code tags: [code] Your code here [/code]
I`m sorry, but it`s my first "program" on C++, and i`m learing it by my self, so please take this in consideration.
Grey Wolf suggestion solved the problem.
thnx guys.