sort vector>int> by size c++ code example Example: std vector sort std::sort(myvector.begin(), myvector.end());