添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
高大的日记本  ·  C++ ...·  1 年前    · 
热情的签字笔  ·  ComponentOne DataGrid ...·  1 年前    · 
内向的鞭炮  ·  php连接mysql之mysql_conne ...·  2 年前    · 


#include <iostream>
#include <set>

using namespace std;

int main()
{

// cbegin/cend(c++11): Returns a const_iterator pointing to the first element in the container/
// Returns a const_iterator pointing to the past-the-end element in the container
std::set<int> myset = { 50, 20, 60, 10, 25 };

std::cout << "myset contains:";
for (auto it = myset.cbegin(); it != myset.cend(); ++it)
std::cout << ' ' << *it;

std::cout << '\n';

system("pause");
return 0;
}

C++ std::set 取第一个元素_#include