新微赢技术网
标题:
高手:这个题的错误提示....
[打印本页]
作者:
Forever紫月
时间:
2009-11-3 03:18
标题:
高手:这个题的错误提示....
class clock{
private:
int hour,minute,second;
public:
void init();
void update();
void display();
};
# include <iostream.h>
# include"clock.h"
void clock::int()
{
hour=minute=second=0;
}
void clock::update()
{
second++;
if(second==60){
second=0;
minute++;
}
if(minute==60){
minute=0;
hour++;
}
if(hour==24)
hour=0;
}
void clock::display()
{
cout<<hour<<":"<<minute<<":"<<second<<endl;
}
# include<iostream.h>
# include"clock.cpp"
void main()
{
int i;
clock A,B;
cout<<"A:"<<endl;
A.init();
for(i=0;i<10;i++){
A.update();
A.di
欢迎光临 新微赢技术网 (http://bbs.weiying.cn/)
Powered by Discuz! X3.2