摘要: 1. 定义 (1)顺序存储typedef struct{ ElemType data[MAXSIZE]; int length;}SqList;(2)链式存储typedef struct NODE{ int data; struct NODE *next;}node;一个结构内部包含一个类型为该结构本身的成员是非法的,但是包含一个指向该结构的指针是合法的。 注意:这里必须要用结构的标签来声明指针。2. 实现(1)顺序存储结构的获取元素,插入,删除操作。#include<stdio.h>#include<stdlib.h>#include<time.h>#de 阅读全文
posted @ 2011-12-08 17:20 shiney 阅读(328) 评论(1) 推荐(1) 编辑
摘要: 1. 结构体的声明 struct A{...}; C: struct A a; C++: A a; 阅读全文
posted @ 2011-12-08 16:25 shiney 阅读(157) 评论(0) 推荐(0) 编辑