Search Results for: Sorting seeds
, , }; //now we call the sort function sort(intarray, intarray + size); cout #include #include #include using namespace std; int main() { // warning this type of initialization requires a c+ compiler vector intvec = { , , , , , , , }; vector stringvec = {"john", "bob", "joe", "zack", "randy"}; // sorting
called. the sort function will automatically assign an element to both i and j. the function you make needs to have a return type of boolean. so when we define bool waytosort(int i, int j) { return i > j; }, we are saying we wanted it to sort descending because i>j. whereas ascending would be i()); sorting...
http://www.cplusplus.com/articles/NhA0RXSz/