当前位置: 首页>>代码示例>>C++>>正文


C++ Dictionary::Filled方法代码示例

本文整理汇总了C++中Dictionary::Filled方法的典型用法代码示例。如果您正苦于以下问题:C++ Dictionary::Filled方法的具体用法?C++ Dictionary::Filled怎么用?C++ Dictionary::Filled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Dictionary的用法示例。


在下文中一共展示了Dictionary::Filled方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: MakeThemeDictionary

void MakeThemeDictionary ( const string filename , const int maxLenght =
      MAX_WORD_LENGTH ) {
   myDict = ThemeDictionary( maxLenght , filename );
   myMenu.SetIntro(
         Banner() + HOW_MANY_WORDS
               + swansonString::GetString( myDict.NumWords() ) + " words!!!" );
   if ( !myDict.Filled() )
      usePreFabDict();
}
开发者ID:swanyriver,项目名称:ASSIGNMENT-4,代码行数:9,代码来源:phrase.cpp

示例2: PlainDict

void PlainDict () {
   //Constructs a dict of MaxWordLength letter long words
   myDict = Dictionary( MAX_WORD_LENGTH );
   myMenu.SetIntro(
         Banner() + HOW_MANY_WORDS
               + swansonString::GetString( myDict.NumWords() ) + " words!!!" );

   if ( !myDict.Filled() )
      usePreFabDict();
}
开发者ID:swanyriver,项目名称:ASSIGNMENT-4,代码行数:10,代码来源:phrase.cpp

示例3: usePreFabDict

void usePreFabDict () {
   myDict = Dictionary( PreFabDict::getSet() );

   myMenu.SetIntro(
         Banner() + HOW_MANY_WORDS
               + swansonString::GetString( myDict.NumWords() ) + " words!!!" );

   if ( myDict.Filled() ) {
      cout << endl
            << "something strange has happend, we had an empty dictionary"
            << " but don't worry, we can still play with my limited stored vocabulary";
      cout << endl << "press anything to continue:";
      getchar();
   } else {
      cout << endl
            << "something has gone very wrong here, we have no words, we cannot play";
      cout << endl << "press anything to exit:";
      exit( 1 );
   }
}
开发者ID:swanyriver,项目名称:ASSIGNMENT-4,代码行数:20,代码来源:phrase.cpp

示例4: SetDictionary

/**************************************************************
 *
 * * Entry: none
 *
 * * Exit: inflated dictionary with maxLength as its longest word(s)
 *
 * * Purpose: change word length to match difficulty
 *
 * ***************************************************************/
void SetDictionary ( int maxLength ) {
   myDict = Dictionary( maxLength );
   if ( !myDict.Filled() )
      myDict = PreFabDict::UsePreFabDict();
}
开发者ID:swanyriver,项目名称:assignment6,代码行数:14,代码来源:multiGame.cpp


注:本文中的Dictionary::Filled方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。