If I have these classes:
[code=cpp]class student {
private:
string * name;
int faculty number;
date datebirth;
public:
...
};
class students : public student {
private:
/*array with objects from class student - how to define it ? */
int stream;
string *specialty;
public:
void AddNew(student student1); /* with dynamic array */
void DeleteStudent(s tring *name);
};
[/code]
how can i write a method to add a object in a dynamic array ?
[code=cpp]class student {
private:
string * name;
int faculty number;
date datebirth;
public:
...
};
class students : public student {
private:
/*array with objects from class student - how to define it ? */
int stream;
string *specialty;
public:
void AddNew(student student1); /* with dynamic array */
void DeleteStudent(s tring *name);
};
[/code]
how can i write a method to add a object in a dynamic array ?
Comment