数据结构
文章平均质量分 75
希尔希尔
这个作者很懒,什么都没留下…
展开
-
线性表的创建、插入、删除和定位
#include using namespace std; #define LIST_INIT_SIZE 100 #define LIST_INCREATMENT 10 const int OK=1; const int ERROR=0; typedef struct { char *elem; int ListSize; int length; }SqL原创 2013-04-03 16:22:03 · 879 阅读 · 0 评论 -
双向链表(创建、求长、打印、删除、插入)
#include using namespace std; typedef struct student { int data; student *pre; student *next; }dnode; dnode* creat() { dnode *head, *p, *s; head = new dnode; p = head; int cycl原创 2013-08-09 14:15:01 · 610 阅读 · 0 评论 -
队列(插入、删除、求长、打印)
#include using namespace std; typedef struct student { int data; student *next; }node; typedef struct linkQueue { node *first; node *rear; }queue; queue* insert_queue(queue* HQ,原创 2013-08-09 15:18:23 · 573 阅读 · 0 评论 -
从字符串中删除指定子串或指定元素
一)从字符串中删除指定子串 转载地址: http://hi.baidu.com/fangm/item/85b8db57b926ed948d12ed44 #include void delsub(char *str, char *sub) { char *psrc = str, *pdest = str, *psub, *p; if((str == NULL) || (s转载 2013-08-12 17:23:13 · 2974 阅读 · 0 评论 -
C++ 中string.find() 函数的用法总结[转]
转载地址:http://blog.csdn.net/yushuai007008/article/details/7051385 #include #include using namespace std; void main() { [cpp] view plaincopyprint? ////find函数返回类型 size_type st转载 2013-08-14 10:20:34 · 1113 阅读 · 0 评论