```c++
#include<iostream>
using namespace std;
class Ctime{
public:
Ctime(int h,int m,int s){
hour = h;
minute = m;
second = s;
}
void showTime(){
cout<<"时间是:"<<hour<<":"<<minute<<":"<<second<<endl;
}
private:
int hour,minute,second;
};
int main(){
Ctime c(1,02,30);
c.showTime();
return 0;
}
```
cout<<"时间是:"<< setw(2) << setfill('0') << hour<<":"<< setw(2) << setfill('0') << minute<<":"<<setw(2) << setfill('0')<<second<<endl;
那具体显示成啥样子了呢?你希望显示成什么样子呢?
需要格式化一下再输出。