第十周项目训练1
2016-05-19 08:45
281 查看
/*
*Copyright (c) 2016,烟台大学计算机学院
*All rights reserved.
*文件名称 :
*作 者 : 王玙璠
*完成日期 : 2016年5月19号
*版 本 号 : v1.0
*
问题描述:
阅读程序,写出执行结果
程序:
运行结果应为:
CAEFBD
运行测试结果:
*Copyright (c) 2016,烟台大学计算机学院
*All rights reserved.
*文件名称 :
*作 者 : 王玙璠
*完成日期 : 2016年5月19号
*版 本 号 : v1.0
*
问题描述:
阅读程序,写出执行结果
程序:
#include<iostream> using namespace std; class Date { public: Date(int i):x(i){cout<<"A";} ~Date(){cout<<"B";} private: int x; }; class Base { public: Base(int i):b1(i){cout<<"C";} ~Base(){cout<<"D";} private: int b1; }; class Derived:public Base { public: Derived(int i,int j):Base(i),d1(j){cout<<"E";} ~Derived(){cout<<"F";} private: Date d1; }; int main() { Derived obj(1,2); return 0; }
运行结果应为:
CAEFBD
运行测试结果:
相关文章推荐
- plsql注释显示乱码问题
- Delphi中的消息处理
- Time类中的运算符重载
- MySQL Show命令的使用
- windows7系统怎么打开指定端口 windows7检查端口未打开还是网络故障方法
- c++作业6
- RISC与CISC(精简指令集与复杂指令集)比较(转载)
- SSH三大框架的工作原理及流程
- server_2003_r2_standard_sp2_vl_X13-46532
- GIT与Eclipse的集成使用
- 内核中的静态映射表一般在哪里
- 无向图最短路径dijkstra算法
- 第十.十一周项目3 - 警察和厨师——2
- [leetcode] 121. Best Time to Buy and Sell Stock 解题报告
- 批处理简单应用
- jQuery点击输入框显示验证码图片
- Centos 下配置两个tomcat nginx 负载
- 人数不定的工资类
- Cookie简述
- 阅读项目-3