set::make_value (STL/CLR)

构造值对象。

    static value_type make_value(key_type key);

参数


  • 使用的密钥值。

备注

成员函数返回关键是 key的 value_type 对象。 使用该对象组成应用于多个其他成员函数。

示例

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

要求

标题: <cliext/设置>

命名空间: cliext

请参见

参考

set (STL/CLR)

set::key_type (STL/CLR)

set::value_type (STL/CLR)