Unit6--problem1.2--悦
来源:互联网 发布:淘宝在线客服没有了 编辑:程序博客网 时间:2024/04/29 18:50
/*Univercity:烟台大学*@Class</A>计134~4*@Author:薛富磊*@Time:2014-4-1*@Function:阅读程序*@Args:*@Return:*/#include<iostream>using namespace std;class CE{private: int a,b; int getmin() { return (a<b? 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); //比较d,c大小返回}int main(){ int x=5,y=12,z=8; CE *ep; ep=new CE; //动态分配空间 ep->SetValue(x+y,y-z,10); //相当于SetValue(17,4,10) cout<<ep->GetMin()<<endl; //输出ep指向地址(比较4和10并返回) CE a=*ep; //赋值为4 cout<<a.GetMin()*3+15<<endl; //计算输出27 return 0;}/*心得体会: 水到渠成
0 0
- Unit6--problem1.2--悦
- Unit6--problem1.1--悦
- unit6
- unit6
- Unit6
- Unit--problem1.3--悦
- problem1——2
- Problem1
- Problem1
- Unit14-problem1.2-动物怎么叫
- Unit13-problem1.2-圆大小比较
- linux unit6
- Unit6 文档
- unit6-nfs
- Linux Unit6
- snort problem1
- Problem1:twoSum
- 计算机英语词汇(Unit6)
- 把二元查找树转变成排序的双向链表
- NOTE:rfc5766-turn-server
- 报表制作
- Activity的生命周期
- pop3协议收取邮件
- Unit6--problem1.2--悦
- php 检测敏感字的实现
- 使用 jsoup 对 HTML 文档进行解析和操作
- unity使用GL库画线
- 解析xml文本
- Unit--problem1.3--悦
- pyscws4 是一个python的分词程序
- MAC OS 下搭建SVN服务
- Java enum的用法详解