12 2016 档案
c/c++ qsort 函数 结构体简单使用(1)
摘要:1 #include 2 #include 3 #include 4 5 typedef struct student { 6 char *name; 7 }; 8 9 void scan(student stu[], int &n){ 10 char str[1024]; 11 scanf("%d", &n); 12 for(int ...
阅读全文
c/c++ qsort 函数的简单使用(1)
摘要:1 #include 2 #include 3 //打印数组元素 4 void print(int arr[], int n){ 5 for(int i = 0; i 2 #include 3 //打印数组元素 4 void print(int arr[], int n){ 5 for(int i = 0; i < n; ++i){ 6 ...
阅读全文
双端链表 冒泡排序 有头结点
摘要:1 #include 2 #include 3 #include 4 5 typedef char * ElemType; 6 7 typedef struct DuLNode { 8 ElemType data; 9 struct DuLNode *prior, *next; 10 } DuLNode, *DuLinkList; 11 12 13...
阅读全文
C/C++ 结构体 指针 函数传递
摘要:1 #include 2 #include 3 4 struct student{ 5 int num; 6 char str[20]; 7 double dec; 8 }; 9 10 void scan(struct student *stu[], int *n){ 11 scanf("%d", n); 12 *stu ...
阅读全文
C/C++ 结构体 指针 简单输入输出
摘要:1 #include 2 #include 3 4 struct student{ 5 int num; 6 char str[20]; 7 double dec; 8 }; 9 10 int main(){ 11 int n; 12 struct student *stu; 13 14 scanf("%d", &n);...
阅读全文
C/C++ 结构体 数组 函数传递
摘要:1 #include 2 #include 3 4 struct student{ 5 int num; 6 char str[20]; 7 double dec; 8 }; 9 10 void scan(struct student stu[], int *n){ 11 scanf("%d", n); 12 for(int i ...
阅读全文
C/C++ 结构体 数组 简单输入输出
摘要:1 #include 2 #include 3 4 struct student{ 5 int num; 6 char str[20]; 7 double dec; 8 }; 9 10 11 int main(){ 12 13 int n; 14 struct student stu[10]; 15 16 s...
阅读全文
C/C++ 结构体 函数传递
摘要:1 #include 2 #include 3 4 struct student{ 5 int num; 6 char str[20]; 7 double dec; 8 }; 9 10 void scan(struct student *stu){ 11 // scanf("%d%s%lf", &stu->num, stu->str, &s...
阅读全文
C/C++ 结构体 简单输入输出
摘要:1 #include 2 #include 3 4 struct student{ 5 int num; 6 char str[20]; 7 double dec; 8 }; 9 10 11 int main(){ 12 13 struct student stu; 14 15 scanf("%d%s%lf", &s...
阅读全文