Skip to content

Latest commit

 

History

History
4 lines (2 loc) · 293 Bytes

6.24.md

File metadata and controls

4 lines (2 loc) · 293 Bytes

The function prototype is the same as void print(const int *ia), which means we can pass any pointer to int to the function, not only an array of ten ints. This will lead to an error. We can change the parameter to a reference to array:

void print(const int (&ia)[10]) { /* ... */ }