HELP I am confused by this STl hw question I have.

I have never heard of a STL template. I tried going through the chapter again with no luck because I don't see how any of these could be answers. Since it has nothing to do with type-safe classes STL is for containers and iterators, and I don't even understand how string class fits in


An STL template ____________________.

a
allows the definition of type-safe classes
b
is a container
c
is an iterator
d
includes the string class.
Last edited on
STL is the name of the c++ containers: vector, list, map, etc.

string and iterators are not template library classes for sure.

Is a container... is correct.

a is arguable ... I would say its just B. STL supports this, but the wording is weird ... your own template class without any STL would do that too.



No, the answer is A.

An “STL” template is any standard object that is templated. These include all templated classes, functions, and objects in the standard library. (Forgiving the use of “STL”.)

The purpose of templates is to provide type-safe generics.
Last edited on
Topic archived. No new replies allowed.