I have a certain function. Its prototype is
|
void whatever(const int* p, const unsigned& length)
|
I want to pass as the first parameter the pointer to the beginning of an array. How can i do that?
1 2 3 4 5 6
|
int main(void) {
int vect[len];
whatever(*vect, len) //This does not work, but hopely you get the idea of
// what i want to do
return 0;
}
|
EDIT : Self answered question. I just had to do
Last edited on
The parentheses aren't strictly necessary either:
whatever(vect,len);