- 8
- 0
- 约2.41万字
- 约 19页
- 2023-08-01 发布于辽宁
- 举报
#ifndef HEADER_KESHE1
#define HEADER_KESHE1 class Birthdate {
unsigned year,month;
public :
Birthdate(unsigned=1900, unsigned=01);
void SetYear(unsigned);
void SetMonth(unsigned);
unsigned GetYear() const;
unsigned GetMonth() const;
friend ostream operator(ostream out, Birthdate b){
return outsetw(6) b.year / setw(2) setfill(0) b.month;
}
friend istream operator(istream in,Birthdate b){ string buf; in buf;
b.SetYear(atoi(buf.substr(0,4).c_str()));
b.SetMonth(atoi(buf.substr(5,2).c_str()));
return in;
}
friend ofstream operator(ofstream fout, Birthdate b){ fout setfill( )b.GetYear() /;
fout
您可能关注的文档
最近下载
- 2014黑龙江省公务员考试职位表下载2014黑龙江省公务员考试职位表下载.doc VIP
- DL∕T 1093-2018 电力变压器绕组变形的电抗法检测判断导则.docx VIP
- 武汉理工大学材料科学基础课件全下.ppt
- 标称电压高于1000V架空线路用绝缘子使用导则 第3部分交流系统用棒形悬式复合绝缘子.pdf VIP
- 通信动力机务员操作技能题库.doc VIP
- 2026年高考河北卷物理高考真题(解析在卷尾版).docx VIP
- 2《丁香结》课件(共22张PPT).pptx VIP
- Unit 2 Home sweet home 第1课时 课件- 人教版英语八年级上册.pptx
- 2025年高级(三级)信息通信网络机务员(动力机务)《理论知识》真题及答案.docx VIP
- 年产20000吨高速通信基板用电子材料项目环境报告书.pdf
原创力文档

文档评论(0)