本文整理汇总了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();
}
示例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();
}
示例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 );
}
}
示例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();
}