| Profil de Little.PingB-City--While with...PhotosBlogListes | Aide |
|
|
04/08/2006 这个月的第一段代码……竟然是个.h#ifndef __TYPESETTING_H__ #define __TYPESETTING_H__ #include <iostream> #include <fstream.h> #include <string.h> #include <stdlib.h> class TypeSetting { public: TypeSetting(int s , char * filename); //For convenience enum a {MAXIMUM = 500}; //Denotes the maximum numbers of character in a single line int MaximumCharacters; //WordCount[i] represents the total characters from word 1 to i int WordCount[MAXIMUM]; //The array words stores all the words read from input file char words[MAXIMUM][50]; int wordNumber; long linecost[MAXIMUM][MAXIMUM]; //Keep track of the index of word when the minimum value is reached for each word. int mark[MAXIMUM]; void CalculateWordCount(); void CalculateLineCost(); void WorkOut(); void PrintOut(int cursor); }; #endif |
|
|