第5周项目--程序阅读
2015-04-05 15:51
197 查看
#include<iostream> using namespace std; class CE { private: int a,b; int getmin(){return (a<b? a:b);} public: int c; void SetValue(int x1,int x2, int x3) { a=x1; b=x2; c=x3; } int GetMin(); }; int CE::GetMin() { int d=getmin(); return (d<c? d:c); } int main() { int x=5,y=12,z=8; CE *ep; ep=new CE; ep->SetValue(x+y,y-z,10); cout<<ep->GetMin()<<endl; CE a=*ep; cout<<a.GetMin()*3+15<<endl; return 0; }
相关文章推荐
- 第5周项目--程序阅读
- 第5周项目--程序阅读——指针、const、static
- 第5周-项目0-阅读程序
- 第10周上机实践项目1——程序填充与阅读
- 第十周项目一 (程序填充与阅读)1:(拓展)
- 专访许鹏:谈C程序员修养及大型项目源码阅读与学习
- 专访许鹏:谈C程序员修养及大型项目源码阅读与学习
- 2013级C++第12周程序阅读项目——理解函数
- 第十周 项目一:程序填充与阅读(1)
- 第十周项目一 (程序填充与阅读) 1:
- 第十周项目一 程序填充与阅读
- 第十周项目1:程序填充与阅读的拓展题目
- 让web程序也能自动安装 分类: WEB项目应用 2009-12-01 17:02 488人阅读 评论(0) 收藏
- 第十周项目一程序填充与阅读
- 第10周项目1-程序填充与阅读
- 第十周项目一 程序填充与阅读1
- 第十六周上机项目阅读程序二
- 第十六周项目一----阅读程序
- 专访许鹏:谈C程序员修养及大型项目源码阅读与学习
- 第10周项目1-程序填充与阅读-1