|
|
|
|
|
by a_t48
3323 days ago
|
|
Beyond this, &ptr
and &arr
are different types! The signature for bogus(arr, &arr)
is something like void bogus(const char* arg1, const char (*arg2)[12])
While they do point to the same data, it's pretty rare to actually want to declare a const char (*)[N]
as a function argument - template magic code excepted, you don't gain much over a char *
and it's not the same as a char**
The two lines do different things, so of course they will generate different code. What do you know, the one that actually lets you do useful things is a few bytes longer. |
|