我认为两者都是有效的C语法,但哪个更好?
一个)
void func(int a[]); // Function prototype
void func(int a[]) { /* ... */ } // Function definition
Run Code Online (Sandbox Code Playgroud)
要么
B)
#define ARRAY_SIZE 5
void func(int a[ARRAY_SIZE]); // Function prototype
void func(int a[ARRAY_SIZE]) { /* ... */ } // Function definition
Run Code Online (Sandbox Code Playgroud) c ×1