05 2013 档案

商品折扣问题
摘要:#include using namespace std;class Product{public: Product(int m,int q,float p):num(m),quantity(q),price(p){}; void total(); static float average(); s... 阅读全文
posted @ 2013-05-07 21:55 程序+爱=人生 阅读(186) 评论(0) 推荐(0) 编辑
函数max用指向对象的指针作函数参数
摘要:#include using namespace std;class Student{public: Student(int n,int s):num(n),score(s){}; void display(); int num; int score;};void Student::display(... 阅读全文
posted @ 2013-05-07 21:52 程序+爱=人生 阅读(286) 评论(0) 推荐(0) 编辑
建立一个数组,内存放5个学生的数据(学号、成绩),用指针指向数组首元素,输出1、3、5学生的数据
摘要:#include using namespace std;class Student{public: Student(int n,int s):num(n),score(s){}; void display();private: int num; int score;};void Student::... 阅读全文
posted @ 2013-05-07 21:49 程序+爱=人生 阅读(572) 评论(1) 推荐(1) 编辑

 
点击右上角即可分享
微信分享提示