本想编一个关于“时钟”的编程,但是程序显示总是错的,求问怎样改进!
#include<iostream>#include<Time.h>
using namespace std;
void printTime( Time &t) // D:\C++\例子\之中.cpp(5) : error C2065: 'Time' : undeclared identifier
class Time
{
friend void printTime (Time &t);
public:
Time (int hour ,int min, int sec);
private:
int m_ihour;
int m_iminte;
int m_isecond;
}
int main(void)
{
Time t(6,34,25);
printTime(t);
systerm("pause");
return 0;
}
void printTime (TIme &t)
cout << t.m_ihour<< ":"<< t.m_iminte << ":" << t.m_isecond <<endl;