
数据结构
姑苏夜半
Understand what's ur value
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
静态库和动态库生成教程
1.静态库私家车放在哪里都可以,编译的时候装载进来。不占用调用时间,代码占用体积大。名称格式:linxx.a,其中xx 指代库名1.生成需要的.o文件2.生成libxx.a静态库ar -cr libxx.a yyy.o ///yyy需要的.o文件名3.发布库的头文件和库到指定路径/usr/local/include //头文件发布路径/usr/local/lib //.a发布路径4.使用生成的静态库生成可执行文件maingcc -L /usr/local/lib -o原创 2022-03-28 22:52:00 · 1278 阅读 · 0 评论 -
数据结构-线性表实现
1.makefileall: mainmain: main.o sqlist.o $(CC) $^ -o $@clean: rm *.o main -rf2.sqlist.c#include <stdio.h>#include <stdlib.h>#include "sqlist.h"sqlist* sqlist_create(){ sqlist *me; me = (sqlist*)malloc(sizeof(* me)); if(me ==原创 2022-03-25 00:32:45 · 1366 阅读 · 0 评论 -
数据结构-带头结点链表实现
1.makefileall: mainmain: main.o list.o $(CC) $^ -o $@clean: rm *.o main -rf2.list.c#include "list.h"#include <stdio.h>#include <stdlib.h>list* list_create( ){ list * me; me = (list*)malloc(sizeof(list)); if(me == NULL) re原创 2022-03-25 00:24:04 · 406 阅读 · 0 评论 -
数据结构-无头节点链表实现
1.makefile:all: mainmain: main.o nohead.o $(CC) $^ -o $@clean: rm *.o main -rf2.nohead.h#ifndef NOHEAD_H__#define NOHEAD_H__#define NAMESIZE 1024struct score_st{ int id; char name[NAMESIZE]; int math; int chinese;};struct node_st{原创 2022-03-25 00:19:39 · 945 阅读 · 0 评论 -
数据结构-单链表应用多项式
**易错点:**cur = head->next并不意味着这两个指针进行了绑定,即改变cur就会改变head->next,二者只是指向了同一个空间;如果两个都是二级指针,则对cur操作等价于对head->next操作;故cur=head后,对cur->next操作等价于对head->next操作#include <stdio.h>#include <stdlib.h>struct node_st{ int cef; int exp;原创 2022-03-25 00:12:53 · 961 阅读 · 0 评论