hash_multiset::make_value (STL/CLR)

建構值物件。

    static value_type make_value(key_type key);

參數

  • Key - 索引鍵
    若要使用的機碼值。

備註

成員函式會傳回value_type物件的索引鍵是key。您可以用它來撰寫適用於數個其他成員函式的物件。

範例

// cliext_hash_multiset_make_value.cpp 
// compile with: /clr 
#include <cliext/hash_set> 
 
typedef cliext::hash_multiset<wchar_t> Myhash_multiset; 
int main() 
    { 
    Myhash_multiset c1; 
    c1.insert(Myhash_multiset::make_value(L'a')); 
    c1.insert(Myhash_multiset::make_value(L'b')); 
    c1.insert(Myhash_multiset::make_value(L'c')); 
 
// display contents " a b c" 
    for each (Myhash_multiset::value_type elem in c1) 
        System::Console::Write(" {0}", elem); 
    System::Console::WriteLine(); 
    return (0); 
    } 
 
  

需求

標頭: < cliext/hash_set >

Namespace: cliext

請參閱

參考

hash_multiset (STL/CLR)

hash_multiset::key_type (STL/CLR)

hash_multiset::value_type (STL/CLR)