Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Student
- {
- char *name, *rol, *adresa;
- int cod_postal;
- public:
- Student() {}
- Student(char *, char *, char*, int);//Constructor
- ~Student();//Destructor
- void afisare_date();
- };
- //constructor
- Student::Student(char *name, char *rol, char* adresa, int cod_postal)
- {
- this->name = new char[strlen(name) + 1];
- strcpy(this->name, name);
- this-> rol = new char[strlen(rol) + 1];
- strcpy(this->rol, rol);
- this->adresa = new char[strlen(adresa) + 1];
- strcpy(this->adresa, adresa);
- this->cod_postal = cod_postal;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement