求助!这个程序怎么运行不了 到底是哪里错我 我早了半天 也没找到
#include<iostream>using namespace std;
class time
{public:
time()
{hour=0;
minute=0;
sec=0;
}
void set_time();
void show_time();
private:
int hour;
int minute;
int sec;
};
void time::set_time()
{cin>>hour;
cin>>minute;
cin>>sec;
}
void time::show_time()
{cout<<hour<<":"<<minute<<":"<<sec<<endl;
}
int main()
{time t1;
t1.set_time();
ti.show_time();
time t2;
t2.show_time();
return 0;
}