摘要: #include <iostream> using namespace std; enum myColor { BLACK, WHITE }; class Mammal { public: //constructors Mammal(); ~Mammal(); //accessors int get 阅读全文
posted @ 2023-05-07 21:02 刘梦磊 阅读(129) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; class Clock { public: Clock(); void setTime(int newH, int newM, int newS); void showTime(); private: int hour, 阅读全文
posted @ 2023-05-06 23:09 刘梦磊 阅读(152) 评论(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-05 23:39 刘梦磊 阅读(77) 评论(0) 推荐(0)
摘要: #include <iostream>#include<string>using namespace std;class Person {public: int age; Person(int age) { this->age = age; } Person& aaa(Person& p) { th 阅读全文
posted @ 2023-05-04 20:51 刘梦磊 阅读(72) 评论(0) 推荐(0)
摘要: #include <iostream>using namespace std;class person {public: person() { cout << "person的无参构造函数的调用" << endl; } person(int a) { age = a; cout << "person 阅读全文
posted @ 2023-04-28 23:16 刘梦磊 阅读(12) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; int i = 1; void other() { static int a = 2; static int b; int c = 10; a += 2; i += 32; c += 5; cout << " OTHER 阅读全文
posted @ 2023-04-27 23:07 刘梦磊 阅读(33) 评论(0) 推荐(0)
摘要: #include <iostream>using namespace std;class person {public: person() { cout << "person的无参构造函数的调用" << endl; } person(int a) { age = a; cout << "person 阅读全文
posted @ 2023-04-26 20:37 刘梦磊 阅读(14) 评论(0) 推荐(0)
摘要: #include <iostream>using namespace std;class person {public: person() { cout << "person的无参构造函数的调用" << endl; } person(int a) { age = a; cout << "person 阅读全文
posted @ 2023-04-25 23:19 刘梦磊 阅读(31) 评论(0) 推荐(0)
摘要: #include <iostream>using namespace std;class Person {public: int age; Person() { cout << "默认构造函数调用" << endl; } Person(int a) { age = a; cout << "有参构造函 阅读全文
posted @ 2023-04-24 20:42 刘梦磊 阅读(26) 评论(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-04-23 20:34 刘梦磊 阅读(57) 评论(0) 推荐(0)