3 ms·
The only truly difficult declarations I've encountered dealing with real-world C code is mixing pointers, const, and arrays. Pointer to const str, easy: co
by coldpie 6y ago
The only truly difficult declarations I've encountered dealing with real-world C code is mixing pointers, const, and arrays. Pointer to const str, easy:
const char *str;
array of pointers to const strs, also fairly easy:
const char *strs[4];
const array of pointers to const strs... umm...
const char *const strs[4];
I think? Which const does what?
This is a dummy example, but real-world examples can be a bit less obvious, as you sometimes have to elide the array length:
const char* const* enabledExtensionNames;
From: https://www.khronos.org/registry/OpenXR/specs/1.0/man/html/openxr.html#_xrinstancecreateinfo3 https://www.khronos.org/registry/OpenXR/specs/1.0/man/html/o...
What is this, again?