3 ms·cout << takeFirstN(sort(myVector), 10) << '\n'; ...try that with iterators.by humanrebar 12y agocout << takeFirstN(sort(myVector), 10) << '\n'; ...try that with iterators.