PIP_DEBUG, PIVector sort and doc
This commit is contained in:
10
main.cpp
10
main.cpp
@@ -2,12 +2,8 @@
|
||||
#include <algorithm>
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
PIVector <PIString> v(5, [](size_t i){return PIString::fromNumber(i*2);});
|
||||
v.prepend({"1", "02", "3"});
|
||||
piCout << v;
|
||||
std::sort(v.begin(), v.end());
|
||||
piCout << v;
|
||||
std::sort(v.rbegin(), v.rend());
|
||||
piCout << v;
|
||||
PIVector<int> v{5, 7, 4, 2, 8, 6, 1, 9, 0, 3};
|
||||
v.sort([](const int & a, const int & b){return a > b;});
|
||||
piCout << v; // 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user