Sorted Map Example

Review Questions

1.

Explain an important difference between a template parameter and a function parameter.

2.

What does it mean to instantiate a template function? Describe one way to do this.

3.

Normally, you need to place template definitions in header files. Why is this?

4.

Qt's container classes are used to collect value types. What kinds of things are not appropriate to store by value in a value collection?

5.

Which containers provide a mappings from key to value? List and describe at least two, and tell how they are different from each other.

6.

What does it mean for a container to "manage" its heap objects? How does a container of pointers to heap objects become a "managed container"?

Категории