What is the difference between:
void foo(item* list) { cout << list[xxx].string; }
and
void this(item list[]) {
FYI:
void foo(int (&a)[5]) // only arrays of 5 int's are allowed { } int main() { int arr[5]; foo(arr); // OK int arr6[6]; foo(arr6); // compile error }
but foo(int* arr), foo(int arr[]) and foo(int arr[100]) are all equivalent
foo(int* arr)
foo(int arr[])
foo(int arr[100])