c++ - Zero-length C-array binds to pointer type - Stack Overflow

c++ - Zero-length C-array binds to pointer type - Stack Overflow

瀏覽:838
日期:2025-06-10
Zero-length C-array binds to pointer type up vote 9 down vote favorite 1 I recently wrote a function template which takes a reference to a C-array: template void foo(T(&c_array)[N]); Assuming T is a char, the length of the C-string is N - 1 due to ......看更多