© Thomas Mailund 2021
T. MailundPointers in C Programminghttps://doi.org/10.1007/978-1-4842-6927-5_10

10. Generic Dynamic Arrays

Thomas Mailund1  
(1)
Aarhus N, Denmark
 

Before we move on to the next topic, recursive data structures, I would like to take a short intermezzo and look at dynamic arrays once more. We implemented dynamic arrays for integers, but in this chapter, we will explore techniques to implement generic dynamic arrays, that is, dynamic arrays that will work with any data type. Some of the methods relate to pointers, so it is not entirely outside of this book’s scope, but not all. Still, I feel I would be neglecting an essential topic if I introduced dynamic arrays and not say a few words about how you can generalize the code to work ...

Get Pointers in C Programming: A Modern Approach to Memory Management, Recursive Data Structures, Strings, and Arrays now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.