05 2023 档案

摘要:#include<iostream>#include<cmath>using namespace std;class Point{ private: double x; double y; double z; public: Point(double a,double b,double c):x(a 阅读全文
posted @ 2023-05-24 19:11 张佳木 阅读(61) 评论(0) 推荐(0) 编辑
摘要:#include<iostream>#include<cmath>using namespace std;class Point{ private: double x; double y; double z; public: Point(double a,double b,double c):x(a 阅读全文
posted @ 2023-05-23 20:42 张佳木 阅读(57) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> using namespace std; #include<string> class animal { public: void show() { cout << "Animal"<<" " << "名称:" << name << " " << "年龄:" < 阅读全文
posted @ 2023-05-19 20:53 张佳木 阅读(43) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> using namespace std; #include<string> class student { public: void shangke(); protected: string name; int bj; int id; }; class teac 阅读全文
posted @ 2023-05-18 20:45 张佳木 阅读(37) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> using namespace std; #include<string> class people { public: void setValue(int m, string str) { age = m; name = str; } void display 阅读全文
posted @ 2023-05-17 20:38 张佳木 阅读(51) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> using namespace std; class BaseClass { public: void fn1(); void fn2(); }; void BaseClass::fn1() { cout << "调用基类的函数fn1()" << endl; 阅读全文
posted @ 2023-05-16 20:45 张佳木 阅读(39) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> using namespace std; class Object { private: int weight; public: Object() { cout << "构造Object对象" << endl; weight = 0; } int getWei 阅读全文
posted @ 2023-05-15 20:27 张佳木 阅读(34) 评论(0) 推荐(0) 编辑
摘要:class Base { public: int fn1()const {return 1;} int fn2()const {return 2;} } ; class Derived:private Base { public: int fn1() { return Base::fn1();}; 阅读全文
posted @ 2023-05-14 20:13 张佳木 阅读(55) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> #include <string> using namespace std; class Document { public: Document() { } Document(char* nm); char* name; void PrintNameOf(); 阅读全文
posted @ 2023-05-13 22:24 张佳木 阅读(58) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> #include <string> using namespace std; class Document { public: Document() { } Document(char* nm); char* name; void PrintNameOf(); 阅读全文
posted @ 2023-05-12 20:32 张佳木 阅读(19) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> using namespace std; class BaseClass { public: BaseClass(); }; BaseClass::BaseClass() { cout << "构造基类对象!" << endl; } class Derived 阅读全文
posted @ 2023-05-11 21:26 张佳木 阅读(29) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> using namespace std; enum myColor { BLACK, WHITE }; class Mammal { public: //constructors Mammal(); ~Mammal(); //accessors int get 阅读全文
posted @ 2023-05-10 20:37 张佳木 阅读(59) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> using namespace std; class BaseClass { public: BaseClass(); }; BaseClass::BaseClass() { cout << "构造基类对象!" << endl; } class Derived 阅读全文
posted @ 2023-05-09 22:16 张佳木 阅读(49) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> using namespace std; #include<string> class mother { public: mother() { cout << "mother\n"; } }; class daughter : public mother { p 阅读全文
posted @ 2023-05-08 21:18 张佳木 阅读(72) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> using namespace std; #include<cmath> #include"time_user.h" class point { private: int x, y, z; public: void set() { cin >> x >> y 阅读全文
posted @ 2023-05-07 21:02 张佳木 阅读(158) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> using namespace std; #include"time_user.h" class student { public: void display(); public: int num; string name; char sex; }; void 阅读全文
posted @ 2023-05-06 22:31 张佳木 阅读(199) 评论(0) 推荐(0) 编辑
摘要:#include "time_user.h" time_user::time_user(void) { } time_user::~time_user(void) { } void time_user::timeset() { cin>>h>>m>>s; } void time_user::time 阅读全文
posted @ 2023-05-05 20:01 张佳木 阅读(78) 评论(0) 推荐(0) 编辑
摘要:#include"time_user.h" void main() { time_user t1; t1.timeset(); t1.timedis(); } Time_use.h #pragma once #include<iostream> using namespace std; class 阅读全文
posted @ 2023-05-04 20:52 张佳木 阅读(164) 评论(0) 推荐(0) 编辑

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