It’s possible to build your own custom templatized data structures, including linked lists, queues, stacks and trees. Typically these are implemented with objects that are linked together via pointers. Such code is complex and error-prone—the slightest omissions or oversights can lead to serious memory-access violations and memory-leak errors with no forewarning from the compiler. If many programmers on a large project implement custom containers and algorithms for different tasks, the code becomes difficult to modify, maintain and debug.
Software Engineering Observation 15.1
Avoid reinventing the wheel; program with the components of the C++ Standard Library.
Error-Prevention Tip 15.1
The prepackaged, templatized Standard Library containers are sufficient for most applications. Using the Standard Library helps you reduce testing and debugging time.
Performance Tip 15.1
The Standard Library was conceived and designed for performance and flexibility.
3.147.77.208