找不到的错误,请指教!
class TDate1
{
public:
TDate1(int y,int m,int d)
~TDate1();
void Print();
private:
int year,month,day;
};
TDate1::TDate1(int y,int m,int d)
{
year=y;month=m;day=d;
cout<<"Constructor Called. \n";
}
TDate1::~TDate1()
{
cout<<"destructor called. \n";
}
void TDate1::Print()
{cout<<year<<"."<<month<<"."<<day<<endl;
}
居然这么多的错误,哎,郁闷中!请教大家:
Info :Compiling G:\C++\TDate.cpp
Error: TDate.cpp(5,5):Declaration terminated incorrectly
Error: TDate.cpp(13,10):Undefined symbol 'cout'
Error: TDate.cpp(16,2):'TDate1::~TDate1()' is not a member of 'TDate1'
Error: TDate.cpp(17,29):Illegal character '\' (0x5c)
Error: TDate.cpp(20,8):Undefined symbol 'cout'
Error: TDate.cpp(20,41):Undefined symbol 'endl'