摘要: 劳烦大神看一下,怎么修改啊,怎么查找啊。在现有的基础上。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 class date 7 { 8 public: 9 string name;10 int num;11 date(){num=0;name="";};12 };13 void swap(string s1,string s2)14 {15 string temp;16 temp=s1;17 s1=s2;18 s2=temp;19 }20 voi... 阅读全文
posted @ 2014-03-03 12:43 平凡的凡 阅读(402) 评论(0) 推荐(0)
摘要: 通过看课件,查资料,问同学,百度等多种方法,出来了这个程序,老是虽然给了一周的时间,但是时间算下来时间不多除了各种各样的事情,开始我用了类的方法,但是在查找频率最高的十个单词的时候遇到了问题,不会了,后来不行了,就换了一种方法,用的是结构体。现在还不是很明白感觉,大家看吧。 1 #include 2 #include 3 using namespace std; 4 //定义单词的结构体 5 struct word 6 { 7 char w[20]; 8 int num; 9 struct word *next;10 };11 void sort(struct... 阅读全文
posted @ 2014-03-03 12:38 平凡的凡 阅读(486) 评论(0) 推荐(0)