2013年6月17日

摘要: #include //using namespace std;class Point{private: double x; double y;public: Point(double x1,double y1) { x=x1; y=y1; } ~Point()//析构函数 { cout<<"Th... 阅读全文
posted @ 2013-06-17 18:58 程序+爱=人生 阅读(276) 评论(0) 推荐(0) 编辑

2013年6月16日

摘要: 阅读全文
posted @ 2013-06-16 15:29 程序+爱=人生 阅读(155) 评论(0) 推荐(0) 编辑

2013年5月7日

摘要: #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 程序+爱=人生 阅读(178) 评论(0) 推荐(0) 编辑
 
摘要: #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 程序+爱=人生 阅读(284) 评论(0) 推荐(0) 编辑
 
摘要: #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 程序+爱=人生 阅读(569) 评论(1) 推荐(1) 编辑

2013年4月27日

摘要: //统计学生平均成绩#include using namespace std;class Student{public: Student(int n,int a,int s):num(n),age(a),score(s){} void total(); static float average();... 阅读全文
posted @ 2013-04-27 19:03 程序+爱=人生 阅读(272) 评论(0) 推荐(0) 编辑
 
摘要: #include using namespace std;class Time{public: Time(int,int,int); int hour; int minute; int sec;};Time::Time(int h,int m,int s){ hour=h; minute=m; se... 阅读全文
posted @ 2013-04-27 18:24 程序+爱=人生 阅读(99) 评论(0) 推荐(0) 编辑
 
摘要: #include using namespace std;class Time{public: Time(int,int,int); int hour; int minute; int sec;};Time::Time(int h,int m,int s){ hour=h; minute=m; se... 阅读全文
posted @ 2013-04-27 18:22 程序+爱=人生 阅读(101) 评论(0) 推荐(0) 编辑

2013年4月22日

摘要: #include using namespace std;class Time{public: Time(int,int,int);//声明结构成员函数 int hour; int minute; int sec; void get_time();};Time::Time(int h,int m,i... 阅读全文
posted @ 2013-04-22 19:22 程序+爱=人生 阅读(157) 评论(0) 推荐(0) 编辑
 
摘要: #include using namespace std;class Box{public: Box(int h=10,int w=12,int len=15):height(h),width(w),length(len){}//声明有默认参数的构造函数,参数初始化表初始化数据成员 int volu... 阅读全文
posted @ 2013-04-22 18:54 程序+爱=人生 阅读(132) 评论(0) 推荐(0) 编辑