Imagine these:
int main (void)
{
    int V[101];
    populateSomehow(V);
    std::sort(V, &V[100]); //which one
    std::sort(V, V+100);
}
Is there a 'safer one'?
Imagine these:
int main (void)
{
    int V[101];
    populateSomehow(V);
    std::sort(V, &V[100]); //which one
    std::sort(V, V+100);
}
Is there a 'safer one'?
 
    
    You can use std::begin and std::end since c++ 11. For example:
int V[100];
std::sort(std::begin(V), std::end(V));
 
    
    There is another way in C style:
int V[101];
std::sort(V, V + sizeof(V)/sizeof(V[0]));
