C++, standard library

0. 

1. Standard library header <algorithm>

#include <algorithm>  // for sort

std::array<int,10> s = {5,7,2,8,6,1,9,0,3}; // initial an array

std::sort(s.begin(), s.end());  // sort the array

Guess you like

Origin www.cnblogs.com/sarah-zhang/p/12293735.html