keep it simple, stupid

导航

2011年8月15日 #

多文件统计字频

摘要: 假如有60个文件, 文件名为:zipin1.txt到zipin60.txt文件格式(词语是汉字串,词频是数字):词语 词频词语 词频...所有文件中的词语包括顺序都是一样的,只是词频不一样, 现在要把所有文件中相同词语的词频加起来以相同的格式写到main.txt文件中。#include <windows.h>#include <iostream>#include <fstream>#include <string>#include <vector>using namespace std;const int g_line = 64;cl 阅读全文

posted @ 2011-08-15 16:34 tujiaw 阅读(220) 评论(0) 推荐(0)

类模板之队列

摘要: // Queue.h#ifndef _QUEUE_H_#define _QUEUE_H_template<class T>class Queue{public: Queue(int size = 10); ~Queue(); bool IsEmpty() const; bool IsFull() const; T First() const; T Last() const; Queue<T>& Add(const T &x); Queue<T>& Delete(T &x);private: int front; int rea 阅读全文

posted @ 2011-08-15 10:11 tujiaw 阅读(235) 评论(0) 推荐(0)