Understanding “Expression does not compute the number of elements in this array”

后端 未结 0 1058
长情又很酷
长情又很酷 2020-12-28 16:42

Using Apple Clang 12.0.0 to compile this code:

int my_array[10];
int arr_size = sizeof(my_array) / sizeof(decltype(my_array[0]))

And getting

相关标签:
回答
  • 消灭零回复
提交回复
热议问题