Challenge: Concept for a Container

Let’s try to implement a concept ourselves!

We'll cover the following

Problem

Write a container concept with the following functions:

  • Insert: This accepts an instance of the enclosed type.
  • Pop: This takes an index.

Try it yourself first. If you have trouble getting to the solution, you can always press the “Show Solution” button to see how the problem can be solved. We’ll go through the in-depth solution in the next lesson.

Good luck!

Get hands-on with 1200+ tech skills courses.