摘要: 顺序有些乱,是我没来的及更新。写完初始版本后感觉速度实在是慢,就把开始版本中复杂的数据交换temp=p1->num; p1->num=p->num;p->num=temp; s=p1->word; p1->word=p->word;p->word=s;去掉了,新的代码是//删除了复杂的数据交换 #include#include#includeusing namespace std;typedef struct words{ string word; int num; struct words *next;}words,*Linklist; int 阅读全文
posted @ 2014-03-02 14:40 曹玉松 阅读(264) 评论(1) 推荐(0) 编辑
摘要: 今天,完成了王老师交代的作业1的任务,用了C++语言编写,开始只是想了个基本的框架,开始读文件用了STRING类型,数据处理用了结构体指针。在编写过程中也遇到了种种困难,但都解决了。 #include#include#includeusing namespace std;typedef struct words{ string word; int num; struct words *next;}words,*Linklist; int InitList_L(Linklist &L){ L=new words; L->next=NULL; return 1;} void Pa.. 阅读全文
posted @ 2014-03-02 14:35 曹玉松 阅读(555) 评论(0) 推荐(0) 编辑