当前位置:首页 » 编程博文
开发技术指南» 文章正文
    引言: 读取英文单词,按顺序排列(C++学习题目) tyle=&quo
 

 

    摘要:关于文化产业投资顾问要点策划与原创创意的探讨 我国的文化产业与发达国家的文化产业的支柱地位相比存在很大的差距,制约着我国文化产业发展的因素很多,金融对文化产业支持成为发展我国文化产业的瓶径之一,有很多具有中国民族文化精粹的文艺演出,优秀影视作品的推出仍处于到处化缘的原始阶段,而其他产业相对容易实现融资。君可见在金融市场上买房可以按揭,购车能够贷款,旅游可以提前消费,惟独文化产业仰天长叹。由......
    摘要: 1.合作。不要随便与人合作,与人合作要考虑好利与弊。如果有想法尽快去干, 一个人努力的干,卖命的干。干到差不了,有资本了,可以与人短期性的合作。与 人合作目标要明确。 2.努力。工作要努力,随随便便过日子过四五年也是过,稍微努力的过四五年 也是过,努力的过四五年也是过,何不努力好好的干。如果努力的过好毕业后的四 五年,这对我们以后的人生很有帮助。 3.吃苦耐劳。不要怕......


读取英文单词,按顺序排列(C++学习题目)
读取英文单词,按顺序排列(c++学习题目)

1.     implement a function that counting word frequency. it reads an english article from an user-specified txt file(article.txt) and counts their number. those exclusive words should not be counted. output the words and counts to 2 files. one(3_1_1out.txt) is in lexicographic order, and the other (3_1_2out.txt) is in descending frequency order. 【程序编程相关:Java入门知识

题目: 【推荐阅读:合格的系统集成工程师应该具备的素质

–        using map 【扩展信息:Red Hat Linux 的主要系统目

–        exclusive words:

 

代码:

 

#pragma warning(disable:4786)

 

#include <string>

#include <iostream>

#include <fstream>

#include <functional>

#include <algorithm>

#include <vector>

#include <map>

#include <set>

 

using namespace std;

 

typedef map<string, int>::value_type sival_type;

 

vector<string> *retrieve_text(string file_name)

{

       ifstream artcile_file( file_name.c_str(), ios::in );

       if (!artcile_file) {

              cout << "conn´t open " << file_name.c_str() << " !" << endl;

              exit (1);

       }

       vector<string> *lines_of_text = new vector<string>;

       string textline;

 

       while ( getline(artcile_file, textline, ´\n´))

       {

              //cout << "    " << textline << ´\n´;

              lines_of_text->push_back(textline);

       }

       return lines_of_text;

}

 

void strip_caps( vector<string> *text_file )

{

       string caps( "abcdefghijklmnopqrstuvwxyz" );

      

       vector<string>::iterator iter = text_file->begin();

       for ( ; iter != text_file->end(); ++iter )

       {

              string::size_type pos = 0;

              while ( (pos = (*iter).find_first_of( caps, pos ))

                     != string::npos )

              {

                     (*iter)[ pos ] = tolower( (*iter)[pos] );

              }

       } // end of for

}

 

vector<string> *separate_words( const vector<string> *text_file )

{


...   下一页
 ·.net框架类命名空间    »显示摘要«
    摘要:microsoft.csharp microsoft.visualbasic microsoft.win32 system system.codedom system.codedom.compiler system.collections system.collections.specialized system.componentmodel system.componentmodel.desig......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE