01 // PROJECT AT A GLANCE
C++ POOL — DAY 02 AFTERNOON
CWriting the four great ways of storing data yourself, then making them able to hold anything.
The afternoon covers the fundamental data structures of computing, the ones every language provides and that are worth having written at least once. The real exercise comes next: rewriting the same structures so they accept any kind of data, which directly prepares C++ templates.
A C implementation of a linked list of doubles, then the same list in a generic void *-based version, and finally a stack and a queue written as simple wrappers over that generic list; plus a binary tree of doubles.
PRIMARYC
DELIVERYTEAM RECORD
VERIFICATIONgcc/g++
SOURCEINSPECTOR READY
03 // KEY OUTCOMES
- List, stack, queue and tree implemented end to end, before being allowed to use the language's own
- Genericity in C, and the discovery of its limits — a direct motivation for templates
BEYOND THE BRIEF
- A generic version of each structure in addition to the typed one, which foreshadows C++ templates
04 // SOURCE TREE
READING SOURCE…