欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

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.
*/