Just use compiler option -std=c++20 and use std::span. Don't try reinventing it in C.
If someone needs more than C provides, why on earth would they choose C++?
No rational person is going to want to have to deal with 10x the number of foot guns.
Literally anything when moving from C is better than C++.
If someone needs more than C provides, why on earth would they choose C++?
No rational person is going to want to have to deal with 10x the number of foot guns.
Literally anything when moving from C is better than C++.