c++ primner plus 10.1
来源:互联网 发布:软件测试流生命周期 编辑:程序博客网 时间:2024/05/18 03:07
自己写的c++ primer plus 答案,求通过
#include<iostream>
using namespace std;
class account
{string name;
int money;
int num;
public:
account(string a,int x, int y)
{name=a;
money=x;
num=y;
}
void show()
{cout<<"user name is "<<name<<endl;
cout<<"he has :"<<money<<endl;
cout<<"his hum is"<<num<<endl;
}
~account()
{cout<<"bye"<<endl;
}
};
int main()
{int a,b;
string c;
cout<<"enter the date"<<endl;
cout<<"name"<<endl;
cin>>c;
cout<<"num"<<endl;
cin>>a;
cout<<"money"<<endl;
cin>>b;
account one(c,a,b);
int flag=0;
cout<<"push the date?"<<endl;
cin>>flag;
if(flag)
one.show();
return 0;
}
0 0
- c++ primner plus 10.1
- c plus plus 复习
- C plus plus 的多态性
- c plus plus socket 编程
- c plus plus 第一章练习
- C Plus Plus Env Prepare
- C plus plus sprintf用法
- C-PRIMER PLUS读书笔记
- C-PRIMER PLUS读书笔记
- C Primer Plus 读书笔记
- C Primer Plus学习计划
- C primer plus 一到五章
- 重读 c primer plus
- c primer plus note
- c primer plus chapter6
- c primer plus chapter6
- 《c primer plus》
- c plus template
- 包xcv
- szdfz76
- WPF 不包含适合于入口点的静态“Main”方法
- dgsfdh4356
- gfdshgfdsh46987
- c++ primner plus 10.1
- 重载、隐藏和重写(有的书叫“覆盖”)的区别?
- UVa 10359 - Tiling
- Cassandra数据分布之5分区器
- jQuery插件第五十五:批量获取值返回Json字符串
- position属性absolute与relative 详解
- java解惑之Calendar
- Apache ZooKeeper交流
- do...while(0)的妙用