I have a custom date class that is constructed in the following way:
date date_file("dates.txt");
I want to put this object into a new class as a private member, e.g
//the mem_data class======================================//
class mem_data {
public:
mem_data(int,int,std::string);
~mem_data();
private:
std::vector<reader> mem_store;
int complete;
date date_file;
};
Now that I have declared
date date_file
How can I initialise it?
For instance, if I want to initialize the int complete to zero, I can simply do
complete = 0;
However, date_file is a custom class, so how would I go about initializing the object/calling the constructor?