I'm trying to write a program with a has-a relationship but the initialization isn't working. The error I'm getting is:
h:\oop labs\license retry\license2.0\license2.0\licenses.cpp(15) : error C2275: 'Date' : illegal use of this type as an expression
Licenses::Licenses(int id, string name, string ad, Date, Date)
:issue_date(Date), expiry_date(Date) // error occurs here
{
set_id(id);
set_name(name);
set_addy(ad);
c_count++;
cout << "Constructor called " << c_count << " times";
}
This has something to do with it also
class Date
{
int day, month, year;
static int c_date, d_date;
public:
Date();
Date(int, int, int);
Date(Date &);
~Date();
void set_dd(int);
void set_mm(int);
void set_yy(int);
const int get_dd();
const int get_mm();
const int get_yy();
const void display();
};