I would like to get some good information about the themes mentioned in the title.
So, I would like to get some good notes/tutorials about how to create a dynamic class constructor and save the class instances in a dynamic array which will be defined by the user. I'd like to achive the fallowing problem:
"A family wants to manage its monthly expenses. In order to complete this task, the family needs an application to store, for a certain month, all the family’s expenses. Each expense will be stored in the application through the following elements: day (of the month in which it was made), amount of money and the type of the expense (the family wants to group its expenses in the following categories: house keeping, food, transport, clothing, telephone&internet, others – books, films, sports, etc). The family needs an application in order to repeatedly execute the following functionalities (each functionality is exemplified):"
Thank you. PS: I'd like to mention i`m new to c++, but having knowledge about OOP from python.
EDIT: i got this far by now.
class ExpC
{
private:
int *days;
int *houseK;
int *food;
int *transp;
int *cloth;
int *telNet;
int *others;
public:
/* constructor */
ExpC() //Constructor
{
int *days,* houseK,*food,*transp,*cloth,*telNet,*others;
}
~ExpC() //Deconstructor
{
}
void add(){
}
};