数据结构
「已注销」
这个作者很懒,什么都没留下…
展开
-
typedef与struct用法
1.struct单独使用 struct结构体类型,定义变量时类比于int,char… #include<stdio.h> int a; // 普通变量的定义 struct Student{ // 定义一个结构体 char s; int a; }; struct Student s; // 定义一个结构体变量 int main(){ re...原创 2018-10-03 17:45:50 · 1076 阅读 · 0 评论 -
数据结构复习(一)顺序表的基本操作
#include<iostream> #include<cstdio> // C语言头文件 #include<cstdlib> // malloc头文件 using namespace std; typedef struct{ int* data; int length, MaxSize; // length为当前元素数量,MaxS...原创 2018-10-03 23:51:19 · 243 阅读 · 0 评论 -
数据结构复习(二)链表的定义和操作
#include<iostream> using namespace std; typedef struct Node{ int data; Node *next; }Node, *LinkList; LinkList InitList(){ LinkList L = new Node; L -> next = NULL; return...原创 2018-10-07 00:21:06 · 210 阅读 · 0 评论