6.8 Pointers and arrays
程序员文章站
2022-03-11 18:32:04
...
原完整教程链接:6.8 Pointers and arrays
1.
// C++ implicitly converts parameters using the array syntax ([]) to the
// pointer syntax (*). That means the following two function
// declarations are identical:
void printSize(int array[]);
void printSize(int *array);
/*
Recommendation: Favor the pointer syntax (*) over the array
syntax ([]) for array function parameters.
*/