Possible Duplicate:
What is useful about a reference-to-array parameter?
Are
void myFunction( int (&arg)[4] );
and
void myfunction(int arg[4]);
different? How are they different? What do the first do and how can I call it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
They are different. The first one takes a reference to an array of 4 ints as its argument. The second one takes a pointer to the first element of array of an unknown number of ints as its argument.