ex10.1
来源:互联网 发布:炉石传说淘宝成品号 编辑:程序博客网 时间:2024/06/17 14:19
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;
}
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
- ex10.1
- C++PrimerV5/Ch10/ex10.1-
- ex10.py
- 【Python】Learn Python the hard way, ex10 转义字符
- 1
- 1
- 1
- 1
- 1
- 1
- 1》
- 1
- 1
- 1
- 1
- (1)
- 1
- 1
- BeanUtils 的使用步骤
- LoadRunner - Browser Emulation
- 《雪国》&《湖》读后感
- 黑马程序员——c语言基础:函数
- bochs配置文件的一些说明
- ex10.1
- 50条大牛C++编程开发学习建议
- 蓝桥杯后记
- 绘制圆形图片:登陆头像
- windows ip管理之netsetman
- 树莓派2代通过人体红外感应器控制继电器
- Hibernate查询之SQL查询,查询结果用new新对象的方式接受,hql查询,通过SQL查询的结果返回到一个实体中,查询不同表中内容,并将查到的不同表中的内容放到List中
- 实体类、边界类和控制类
- 关于从一个jsp与另一个jsp传参和接收问题