- 博客(4)
- 收藏
- 关注
翻译 sort函数在结构体中的用
本文参考 作者:宴夜小丑原文:https://blog.youkuaiyun.com/wuzhenzi5193/article/details/80245968对于结构体的复杂排序,也可以使用自定义的布尔方法。首先按成绩由低到高,成绩相同时按照年龄从低到高bool compare(student a,student b){if(a.grade!=b.grade)return a.grade<b....
2019-05-10 20:10:00
886
翻译 sort函数的使用方法
本文参考 是徐慧超呀博主的方法#includeusing namespace std;#include//sort()函数的头文件bool compare(int a,int b){return(a>b);}//定义一个函数compare,用于降序排列/sort函数的使用形式/int main(){int a[100];int i,n;cin>>n;for(i...
2019-05-10 19:45:55
555
原创 数据结构单链表的一系列操作
#include<stdio.h>#include<iostream>#include<stdlib.h>#include<conio.h>using namespace std;#define OK 1#define ERROR 0typedef int status;typedef int ElemType;typedef struct LNod...
2018-03-24 20:32:49
399
翻译 顺序线性表的有关操作(创建,销毁,插入,查找,删除等)
#include<stdio.h>#include <cstdlib>//支持库函数 #include<conio.h>#define MAXSIZE 100typedef struct{ int *elem; int length;}SqList;//创建空表 int InitList(SqList &L){ L.elem=new int[MAXSIZ...
2018-03-16 21:18:53
4602
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人