C99/C11 dynamic array that mimics C++'s std::vector
&gt; What if we want to be able to store more than integers in our dynamic array ? [...] The array_push_back function also needs to be refactored in order to account for the size and type of what we store in the data buffer. A possible approach is to use a macro, instead of the original function:<p>This is a situation where C++ really shines: you can use C++ with templates and not only have much cleaner code, but also avoid forcing the compiler to inline every single call to array_push_back. And you don&#x27;t even need to use anything more than structs and functions, you don&#x27;t need to go &quot;full OO&quot;.<p>I wish C programmers would be more open to C++ but it seems like they&#x27;re for the most part pretty closed. That&#x27;s probably the C++ community&#x27;s fault, but I&#x27;m not sure how to make amends.