摘要: 链表的定义(以整形链表为例):1 typedef struct Node2 {3 int data;4 struct Node *next;5 }Node,* LinkList;定义头节点;1 LinkList head; LinkList(Node *);初始化链表(注意初始化链表传参):int InitList(LinkList *Head) //传的为LinkList *型的数据,即为Node**, //因为要改变头节点的数据,必须传的是地址。{ (*Head) = (Node *)mall... 阅读全文
posted @ 2014-04-06 12:58 _level_ 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 今天练习c++的时候遇到坑爹的情况……用到c++的string,首先是用cout输出string,string c="abcdegrg";cout,class std::allocator >' (or there is no acceptable conversion)e:\编程\test1\af.cpp(43) : error C2144: syntax error : missing ';' before type 'int'百度了一下原来没有加上#include另外如果想用下标方式访问string中的元素是必须加上#in 阅读全文
posted @ 2013-10-31 22:42 _level_ 阅读(204) 评论(0) 推荐(0) 编辑