#include<iostream.h>
#include<fstream.h>
#include<stdio.h>
#include<string.h>
#define NULL 0
class lei{
int year,month,day;
char *buf;
public:
void in();
void record();
lei(){}
void disp();
};
void lei::in(){
cout<<"请输入年月日:"<<endl;
cin>>year>>month>>day;}
void lei::disp(){
cout<<year<<endl;
cout<<month<<endl;
cout<<day<<endl;
}
void lei::record(){
ofstream ofile("c:\\data.txt",ios::binary);
ofile<<"年:"<<year<<endl;
ofile<<"月:"<<month<<endl;
ofile<<"日:"<<day<<endl;
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余1页未读,立即下载