經安全檢測,此網站為安全網站,請放心前往原始網址!

Is there any way to determine the size of a C++ array programmatically? And if not, why? - Stack Ove

Actually, if you allocated the array on the stack the sizeof operator would return 1024 -- which is 256 (the # of elements) * 4 (the size of an individual element). (sizeof(arr)/sizeof(arr[0])) would give the result 256. – Kevin Oct 13 '08 at 16:03

stackoverflow.com

網址安全性掃描由 google 提供