想象这些:
int main (void)
{
int V[101];
populateSomehow(V);
std::sort(V, &V[100]); //which one
std::sort(V, V+100);
}
有没有“更安全的”?
想象这些:
int main (void)
{
int V[101];
populateSomehow(V);
std::sort(V, &V[100]); //which one
std::sort(V, V+100);
}
有没有“更安全的”?