(stu)File1

所属分类:数据结构
开发工具:Visual C++
文件大小:2KB
下载次数:8
上传日期:2012-07-20 18:06:37
上 传 者mbeeper
说明:  打开一个文件,逐行读取生成一个英文字符的索引,产生一个文件保存输入文件中的字符出现的次数、个数和种类。 1、一次读取文件的一行;读取文件使用iostream; 2、除去行中所有的标点符号,利用附录A的程序代码; 3、对于每一行: a)在你构建的索引结构中查找单词; b)如果没有找到(出现新词)就将它插入索引; c)如果找到就更新该词的出现次数(次数加1)。 4、所有行都读入完成后,对索引结构按照字典顺序进行排序。每一行都应包括该单词本身、出现次数,如果有能力,程序还应包含出现该单词的页码; 目标:使用C++语言为任意书籍构造索引字典(英文书)。 输入:书籍的文本文件;测试用例为abc.txt 输出:包含索引的文本文件,包括排序后的英文字典,英文出现次数,出现该英文的页码
(Open a file, read line by line to generate an English character index, resulting in the number of occurrences, the number and types of characters in a file to save the input file. Time to read the file line to read the file using the iostream remove the line, all the punctuation, the use of Appendix A of the code 3, for each line: a) find the word you build the index structure b) If not found (new word) will insert it into the index c) if found to update the number of occurrences of the term (number plus 1). 4, all rows are read into the completed index structure in accordance with the dictionary order sort. Each line should include the word itself, occurrences, if you have the ability, the program should also include the page number of the word target: use C++ language to construct an index for any book dictionary (English books). Input: books, text files test cases abc.txt output: a text file that contains the index, sorted and English dictionary, English occurrences, the page)

文件列表:
(stu)File1.cpp (4295, 2010-12-23)

近期下载者

相关文件


收藏者