早教吧作业答案频道 -->其他-->
有以下程序:#includeclassDate;classTime{public:Time(int,int,int);voiddisplay(Date&);private:inthour;intminute;intsec;};classDate{public:Date(int,int,int);friendvoidTime∷display(Date&);private:intmonth;intday;intyear;};Time
题目详情
有以下程序:
#include
class Date;
class Time
{
public:
Time(int,int,int);
void display(Date &);
private:
int hour;
int minute;
int sec;
};
class Date
{
public:
Date(int,int,int);
friend void Time∷display(Date &);
private:
int month;
int day;
int year;
};
Time∷Time(int h,int m,int s)
{
hour=h;
minute=m;
sec=s;
}
Date∷Date(int m,int d,int y)
{
month=m;
day=d;
year=y;
}
void Time∷display(Date &d)
{
cout
#include
class Date;
class Time
{
public:
Time(int,int,int);
void display(Date &);
private:
int hour;
int minute;
int sec;
};
class Date
{
public:
Date(int,int,int);
friend void Time∷display(Date &);
private:
int month;
int day;
int year;
};
Time∷Time(int h,int m,int s)
{
hour=h;
minute=m;
sec=s;
}
Date∷Date(int m,int d,int y)
{
month=m;
day=d;
year=y;
}
void Time∷display(Date &d)
{
cout
▼优质解答
答案和解析
#include class Date; class Time {public:Time(int,int,int);void display(Date &); private:int hour;int minute;int sec;};class Date ...
看了有以下程序:#includec...的网友还看了以下:
what can i do for you?i`d like to buy a present f 2020-05-16 …
what can i do for you?i`d like to buy a present f 2020-05-16 …
英语翻译How I wish I could surrender my soul;Shed the 2020-05-16 …
When I see you smile I can face the world 是哪首歌的歌词 2020-05-16 …
I'II和I'd什么时候用?比如啥I'iitakeitI'dhopedyou'd……还有他们分别是 2020-06-12 …
(斐波那契数列)谁能解释一下这个程序中的“c[i]:=c[i]+a[i]+b[i];varn,i, 2020-07-23 …
英语翻译canyousendmeanapkin?youlaughatmelooksasifsoug 2020-07-25 …
c自加自减问题我晕了#includemain(){inti,x,y;i=2;x=(++i)+(i++ 2020-11-01 …
选出下面各项中字音有误的一项:A大夫医生dài.fu山大王dài大夫官职dàfūB骀荡dài百战不殆 2020-11-07 …
在I/O设备、数据通道、时钟和软件这四项中,可能成为中断源的是.(A)I/O设备(B)I/O设备和数 2020-12-03 …