正在加载图片...
课堂练习2 #include<iostream. h> #include<string.h> class Date public: Date(int m, int d, int y); Tdateo cout<< Date Destructor calledin; protected: int moth, day, year Tdate: Date(int m, int d, int y) i month=m; day=d; year=y; cout<< Date constructor called\n课堂练习2 #include<iostream.h> #include<string.h> 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” ; }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有