It can also be simpler if you use idiomatic modern C++ with std::array<T, n> and std::function<R(T1, T2)>.
std::array<std::pointer_to<byte>, 10> str;
certainly does not look any more readable to me than byte *str[10];
. (Disclaimer: I mainly work with C, but find some C++ features genuinely useful, although the majority of the time they seem more like absurd complexity for the sake of complexity.)std::array is useful for letting the compiler avoid array-to-pointer decaying, value semantics, and also actually putting array length type info in a function parameter.
var str: array[10, ptr byte]
(and much richer types)Edit: and while I'm here, Nim has other sensible syntax for this low level stuff...
var b: byte = 10
str[0] = addr b
echo $str[0][]