由买买提看人间百态

topics

全部话题 - 话题: sortint
(共0页)
c**********e
发帖数: 2007
1
来自主题: JobHunting版 - C++ Q41: std::sort (C4)
How do you use STL's std::sort algorithm to sort an array declared as int v[
1000]?
a) std::sort(v);
b) std::sort(v,v+1000);
c) std::sort((void*)v, 1000, sizeof(int), sortInt);
(assuming sortInt is defined properly)
d) std::sort((void*)v,(void*) &v+1000, sizeof(int));
e) std::sort(v.begin(),v.end());
(共0页)