📌  相关文章
📜  获取 set c++ 代码示例的第一个元素

📅  最后修改于: 2022-03-11 14:44:52.768000             🧑  作者: Mango

代码示例3
set st {1,2,3,4};

auto first (st.begin()); //get iterator of the first element
cout << *first << endl; //get the value from the iterator

// instead we could directly use :
cout << *(st.begin()) << endl;