C++: Templated Stacks and Queues

Channel:
Subscribers:
2,650
Published on ● Video Link: https://www.youtube.com/watch?v=sbY4o7WtrHI



Duration: 22:12
49 views
0


Today we did a very simple introduction to the concept of templates in C++, which lets you fill in things like a type later. This lets you write a single Stack class that works with any data type, like ints or strings or what have you.

Today we built both a stack class and a queue class using data structures we already know. And that's about it for stacks and queues... they're pretty simple.