I'm exploring a c++ library and cant figure out why its examples are written as they are. In the example they do the following
std::vector<unsigned int> vec(count);
someFunc(&vec[0]);
while the fucion is define as
void someFunc(unsigned int* a);
why are the examples passing a reference to the first element of the vector and not the whole vector. Inst this code the same ?
someFunc(&vec);
Edit: I should have provided more contex. I simplified the case, but this has proven a bad descision. The function is supposed to simplify a mesh, the vec is a list of all the indicies of the mesh. Presumably somewhere in the code that pointer is used to iterate over the rest of the indicies ?