struct语句,求大神帮我看看程序哪里出错了!谢谢!
//用struct定义日期类型struct Tdate{
public:
void SetDate(int y=1900,int m=1,int d=1);
int IsLeapYear();
void print();
private:
int year ,month,day;
};
//tdate.cpp日期类型结构的实现
#include<iostream>
#include"tdate.h"———————— fatal error C1083: Cannot open include file: 'tdate.h': No such file or directory为什么这句是错的?
using namespace std;
void Tdate ::SetDate(int y,int m,int d){
year=y;month=m;day=d;
}
int Tdate::IsLeapYear(){
return((year%4==0 &&year%100!=0)||(year%400==0));
}
void Tdate::Print(){
cout<<year <<','<<month<<','<<day <<endl;
}