In my following code, I am passing a std::vector as a const reference to std::sort function but it shows compilation errors. It is only an example code. In my real code, I need to pass template to the vector (i.e. vector<T>). Therefore, I needed to write a function "sortt()".
The arguments to std::sort should be iterators to the beginning and end of the range that you want to sort. To sort vect all you need to do is sort(vect.begin(), vect.end());