备注
此 API 已过时。替代为 unordered_multiset 类。
返回最后一个元素成功解决的位置。hash_multiset 的 const 迭代器。
const_iterator cend( ) const;
返回值
成功完成最后的元素位置。hash_multiset 类的 const 双向迭代器。 如果 hash_multiset 为 null,则 hash_multiset::cend == hash_multiset::begin。
备注
cend 迭代器用于测试是否到达其 hash_multiset的末尾。 不应取消cend 返回的值。
在Visual C++ .NET 2003中,成员<hash_map> 和 <hash_set> 头文件不再在std命名空间,而是已经进入了stdext命名空间。 有关更多信息,请参见 stdext 命名空间。
示例
// hash_multiset_cend.cpp
// compile with: /EHsc
#include <hash_multiset>
#include <iostream>
int main( )
{
using namespace std;
using namespace stdext;
hash_multiset <int> hs1;
hash_multiset <int> :: const_iterator hs1_cIter;
hs1.insert( 1 );
hs1.insert( 2 );
hs1.insert( 3 );
hs1_cIter = hs1.cend( );
hs1_cIter--;
cout << "The last element of hs1 is " << *hs1_cIter << endl;
}
要求
Header: <hash_set>
**命名空间:**stdext