목차
1. 복사 생성자에 대한 문제
2. friend에 대한 문제
2. friend에 대한 문제
본문내용
y, int m, int d)
{ year=y; month=m; day=d; }
void now(Time &nt);// now 함수의 선언
};
void Date::now(Time& nt) // Time class의 data 멤버를 액세스
{ // 시간과 날짜를 동시에 출력 할 수 있게 해준다.
cout << year << \" 년 \" << month << \" 월 \"<< day << \" 일 \" << \'\\n\';
cout << nt.hour << \" 시 \" << nt.min << \" 분 \" << nt.sec << \" 초 \" << \'\\n\';
}
void main()
{
Time nowtime(8,10,53);
Date nowdate(2005,11,2);
nowdate.now(nowtime);
getch();
}
{ year=y; month=m; day=d; }
void now(Time &nt);// now 함수의 선언
};
void Date::now(Time& nt) // Time class의 data 멤버를 액세스
{ // 시간과 날짜를 동시에 출력 할 수 있게 해준다.
cout << year << \" 년 \" << month << \" 월 \"<< day << \" 일 \" << \'\\n\';
cout << nt.hour << \" 시 \" << nt.min << \" 분 \" << nt.sec << \" 초 \" << \'\\n\';
}
void main()
{
Time nowtime(8,10,53);
Date nowdate(2005,11,2);
nowdate.now(nowtime);
getch();
}
소개글