我有以下設置:避免套迭代器和載體
auto comp = [](const vector<int>& a, const vector<int>& b) -> bool
{ return a.size() < b.size(); };
auto path = std::set <vector<int>, decltype(comp)> (comp);
當我嘗試從組任務
tasks.begin() this will return an iterator of the set
也得到了第一個元素,當我再次嘗試訪問該集合的向量:
tasks.begin()->begin() this will only return an iterator of the vector.
如何獲取該集合的第一個元素而沒有任何迭代器?
'std :: set tasks;' - 那對你有用? –
LogicStuff
忘記了最後>編輯。 – user2524707
它將如何排序? – LogicStuff