#pragma once #include<iostream> usingnamespace std; classCDate { int Date_Year, Date_Month, Date_Day; public: CDate(int y = 2000, int m = 1, int d = 1); CDate(const CDate &date); voidDisplay();
};
#pragma once #include"l3_09.h" #include<iostream> #include<string> usingnamespace std; classCroster { string name; CDate birthday; public: Croster(string na, int y, int m, int d); voidDisplay(); ~Croster();
};
#include"l3_09.h" usingnamespace std; CDate::CDate(int y, int m, int d):Date_Year(y),Date_Month(m),Date_Day(d) { cout << "Constructor called.\n"; }
Reprint policy:
All articles in this blog are used except for special statements
CC BY 4.0
reprint policy. If reproduced, please indicate source
T1g3r
!