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
阅读全文
摘要:#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
阅读全文
摘要:#include<iostream> using namespace std; #include<string> class animal { public: void show() { cout << "Animal"<<" " << "名称:" << name << " " << "年龄:" <
阅读全文
摘要:#include<iostream> using namespace std; #include<string> class student { public: void shangke(); protected: string name; int bj; int id; }; class teac
阅读全文
摘要:#include<iostream> using namespace std; #include<string> class people { public: void setValue(int m, string str) { age = m; name = str; } void display
阅读全文
摘要:#include <iostream> using namespace std; class BaseClass { public: void fn1(); void fn2(); }; void BaseClass::fn1() { cout << "调用基类的函数fn1()" << endl;
阅读全文
摘要:#include <iostream> using namespace std; class Object { private: int weight; public: Object() { cout << "构造Object对象" << endl; weight = 0; } int getWei
阅读全文
摘要:class Base { public: int fn1()const {return 1;} int fn2()const {return 2;} } ; class Derived:private Base { public: int fn1() { return Base::fn1();};
阅读全文
摘要:#include <iostream> #include <string> using namespace std; class Document { public: Document() { } Document(char* nm); char* name; void PrintNameOf();
阅读全文
摘要:#include <iostream> #include <string> using namespace std; class Document { public: Document() { } Document(char* nm); char* name; void PrintNameOf();
阅读全文
摘要:#include <iostream> using namespace std; class BaseClass { public: BaseClass(); }; BaseClass::BaseClass() { cout << "构造基类对象!" << endl; } class Derived
阅读全文
摘要:#include <iostream> using namespace std; enum myColor { BLACK, WHITE }; class Mammal { public: //constructors Mammal(); ~Mammal(); //accessors int get
阅读全文
摘要:#include <iostream> using namespace std; class BaseClass { public: BaseClass(); }; BaseClass::BaseClass() { cout << "构造基类对象!" << endl; } class Derived
阅读全文
摘要:#include<iostream> using namespace std; #include<string> class mother { public: mother() { cout << "mother\n"; } }; class daughter : public mother { p
阅读全文
摘要:#include <iostream> using namespace std; #include<cmath> #include"time_user.h" class point { private: int x, y, z; public: void set() { cin >> x >> y
阅读全文
摘要:#include <iostream> using namespace std; #include"time_user.h" class student { public: void display(); public: int num; string name; char sex; }; void
阅读全文
摘要:#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
阅读全文
摘要:#include"time_user.h" void main() { time_user t1; t1.timeset(); t1.timedis(); } Time_use.h #pragma once #include<iostream> using namespace std; class
阅读全文