what kind of buffer implementation do you recommend for embedded systems, if you face user inputs or received data, of which you do not know the exact length? The class template std::vector in C++ is not available, since AVR does not support the Standard Template libraries. Declaring an oversized array isn't efficient regarding the use of memory. Or do you think, it is a bad software design in general, if data length is variable?
The root problem is a SPI communication, I want to design as generic as possible.