高手:这个题的错误提示....
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.display();
}
cout<<"B:"<<endl;
B.init();
for(i=0;i<10;i++){
B.update();
B.display();
}
}
报这种错误:C:\Documents and Settings\Administrator\C++\Cpp5.cpp(10) : fatal error C1083: Cannot open include file: 'clock.h': No such file or directory
Error executing cl.exe.