正在加载图片...
例94对象成员的使用 class Date bli Tdate(int m, int d, int y B NTdateO cout<<"Tdate Destructor called\n' protected int moth, day, year; Tdate: Tdate(int m, int d, int y) i month=m; day=d; year=y cout<< Date constructor called\n对象成员的使用 class Tdate { public: Tdate(int m,int d,int y); ~Tdate() {cout<<”Tdate Destructor called\n”;} protected: int moth,day,year; }; Tdate::Tdate(int m,int d, int y) { month=m; day=d; year=y; cout<<” Tdate constructor called\n” } 例 9.4
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有