![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
第三章
文章平均质量分 58
bing0528
这个作者很懒,什么都没留下…
展开
-
第3题
#include using namespace std; class Date {public: Date(int=1,int=1,int=2005); void display(); private: int month; int day; int year; }; Date::Date(int m,int d,int y):month(m),day(原创 2015-04-20 16:56:49 · 210 阅读 · 0 评论 -
第10题
#include using namespace std; class Date; class Time {public: Time(int,int,int); friend void display(const Date &,const Time &); private: int hour; int minute; int sec; }; Time::原创 2015-04-20 17:15:51 · 235 阅读 · 0 评论 -
第5题
#include using namespace std; class Student {public: Student(int n,float s):num(n),score(s){} int num; float score; }; int main() {Student stud[5]={ Student(1,85),Student(2,85),Student(原创 2015-04-20 17:05:12 · 270 阅读 · 0 评论 -
第11题
#include using namespace std; class Time; class Date {public: Date(int,int,int); friend Time; private: int month; int day; int year; }; Date::Date(int m,int d,int y):month(m),day(d)原创 2015-04-20 17:18:51 · 172 阅读 · 0 评论 -
第8题
#include using namespace std; class Student {public: Student(int n,float s):num(n),score(s){} void change(int n,float s) {num=n;score=s;} void display() {cout<<num<<" "<<score<<endl;} pri原创 2015-04-20 17:08:22 · 205 阅读 · 0 评论 -
第12题
#include using namespace std; template class Compare {public: Compare(numtype a,numtype b); numtype max(); numtype min(); private: numtype x,y; }; template Compare::Compare(numtype a原创 2015-04-20 17:59:02 · 338 阅读 · 0 评论 -
第4题
#include using namespace std; class Student {public: Student(int n,float s):num(n),score(s){} void display(); private: int num; float score; }; void Student::display() {cout<<num<<"原创 2015-04-20 16:58:24 · 240 阅读 · 0 评论 -
第9题
#include using namespace std; class Product {public: Product(int n,int q,float p):num(n),quantity(q),price(p){}; void total(); static float average(); static void display(); private:原创 2015-04-20 17:09:32 · 308 阅读 · 0 评论