c**********e 发帖数: 2007 | 1 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()); |
|