sort a vector using sort function in c+ code example Example: sort a vector c++ sort(a.begin(), a.end());