主观

#include

using namespace std;

class Date;

class Time

{public:

Time(int h, int m, int s)

{hour=h;minute=m;sec=s;}

void show(Date& d);

private

int hour,minute,sec;

};

class Date

{public:

Date(int m,int d,int y)

{month=m;day=d;year=y;}

void Time::show(date&):

private:

int month,day,year;

};

void Time::show(Date& d)

{cout<

cout<

}

void main()

{Time(9,23,50);

Date d1(12,20,2010);

t1.show(d1);

}

参考答案
您可能感兴趣的试题
¥

订单号:

遇到问题请联系在线客服

订单号:

遇到问题请联系在线客服