摘要: #include <iostream> using namespace std; class BaseClass { public: BaseClass(); }; BaseClass::BaseClass() { cout << "构造基类对象!" << endl; } class Derived 阅读全文
posted @ 2023-05-09 22:16 张佳木 阅读(53) 评论(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 张佳木 阅读(74) 评论(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 张佳木 阅读(166) 评论(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 张佳木 阅读(204) 评论(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 张佳木 阅读(81) 评论(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 张佳木 阅读(167) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; #include<string> class mother { public: mother() { cout << "mother\n"; } }; class daughter : public mother { p 阅读全文
posted @ 2023-04-28 19:51 张佳木 阅读(79) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; #include<string> class date { public: date(void); date(int y, int m, int d); ~date(void); void displayDate(); 阅读全文
posted @ 2023-04-27 20:37 张佳木 阅读(50) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; #include<string> class student { public: student(void); ~student(void); void setValues(int n, string str, char 阅读全文
posted @ 2023-04-26 20:42 张佳木 阅读(14) 评论(0) 推荐(0)
摘要: 问题描述:N个有序数数列已放在一维数组中,利用二分查找法找整数m在数组中的位置,若找到,则输出其下标值;反之,则输出“Not be found!". 完整程序: #include<stdio.h> #define N 10 main() { int i,a[N]={-3,4,7,9,13,45,67 阅读全文
posted @ 2023-04-25 21:11 张佳木 阅读(13) 评论(0) 推荐(0)