04737-C++程序设计2017年04月份历年真题1-答案幻灯片资料

上传人:yulij****0329 文档编号:127333755 上传时间:2020-04-01 格式:DOC 页数:14 大小:4.48MB
返回 下载 相关 举报
04737-C++程序设计2017年04月份历年真题1-答案幻灯片资料_第1页
第1页 / 共14页
04737-C++程序设计2017年04月份历年真题1-答案幻灯片资料_第2页
第2页 / 共14页
04737-C++程序设计2017年04月份历年真题1-答案幻灯片资料_第3页
第3页 / 共14页
04737-C++程序设计2017年04月份历年真题1-答案幻灯片资料_第4页
第4页 / 共14页
04737-C++程序设计2017年04月份历年真题1-答案幻灯片资料_第5页
第5页 / 共14页
点击查看更多>>
资源描述

《04737-C++程序设计2017年04月份历年真题1-答案幻灯片资料》由会员分享,可在线阅读,更多相关《04737-C++程序设计2017年04月份历年真题1-答案幻灯片资料(14页珍藏版)》请在金锄头文库上搜索。

1、switch语句,找到第一个满足的case之后,如果没有break,会继续执行后面的case语句. double operator()(double x,double y) const;#include #include using namespace std;class Birthdaypublic:Birthday(int y,int m,int d);Show();private:int year;int month;int day;Birthday:Birthday(int y,int m,int d)year = y;month = m;day = d;Birthday:Show()

2、coutyear-month-dayendl;class Personpublic:Person(string n,string s,int y,int m,int d);Person( );Show();private:string name;string sex;Birthday* birthday;Person:Person(string n,string s,int y,int m,int d)name = n;sex = s;birthday = new Birthday(y,m,d);Person:Person( )if ( birthday != NULL )delete bir

3、thday;birthday = NULL;Person:Show()cout姓名:nameendl;cout性别:sexendl;coutShow( );void main( )Person* p = new Person(张三,女,2000,10,13);p-Show();delete p;版 权 所 有,侵 权 必 究 联 系Q Q68843242 本页为自动生成页,如不需要请删除!谢谢!如有侵权,请联系68843242删除!1,侵权必究 联系QQ68843242 1,版 权 所 有,侵 权 必 究 联 系Q Q68843242 本页为自动生成页,如不需要请删除!谢谢!如有侵权,请联系68843242删除!版 权 所 有,侵 权 必 究 联 系Q Q68843242 本页为自动生成页,如不需要请删除!谢谢!如有侵权,请联系68843242删除!侵权必究 联系QQ68843242 1

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 高等教育 > 大学课件

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号