posts - 137,comments - 0,views - 40595
12 2022 档案
C语言 (数据结构)在顺序表中用二分查找和冒泡排序算法
摘要:main.c: #include <stdio.h> #include <stdlib.h> #include "SequenceList.h" int main() { //创建顺序表和指针 SequenceList SL, * P_SL; int choice = 0; P_SL = &SL; 阅读全文
posted @ 2022-12-12 16:33 wshidaboss 阅读(136) 评论(0) 推荐(0) 编辑
C语言 图的遍历(广度优先和深度优先、邻接矩阵)
摘要:#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> /* 辅助广度优先遍历用的空闲单元法循环队列 */ #define MaxQueuenNum 20 typedef struct queue { int* arr 阅读全文
posted @ 2022-12-11 15:23 wshidaboss 阅读(759) 评论(0) 推荐(0) 编辑
C++ 设计一个类模板,有数据成员T data[size],有求最大值的方法getMax()和排序的方法sort(),模板参数T可以实例化成int、char、double、float、string等。
摘要:#include <iostream> #include <string> using namespace std; template<typename T,int size> class Data { T data[size]; public: Data() { cout << "input " 阅读全文
posted @ 2022-12-02 15:02 wshidaboss 阅读(53) 评论(0) 推荐(0) 编辑
C++ 模板函数与类的结合 (定义一个Student类,有姓名和三门课的成绩,通过比较学生对象的三门课成绩的总分,实现求总分最高的学生对象)
摘要:#include <iostream> #include <string> using namespace std; class Student { public: Student(); Student(const string& name,int score1,int score2,int sco 阅读全文
posted @ 2022-12-02 10:20 wshidaboss 阅读(68) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

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