Question
Book Icon
Chapter 18.2, Problem 10STE
Program Plan Intro

STL Basic sequential containers:

“slist”:

  • The template class for “slist” class is “<slist>”
  • The template class for “slist” is “slist<T>::iterator”.
    • This class uses mutable and forward iterator.
  • The template class for constant iterator is “slist<T>::const_iterator”.
    • This class uses constant and forward iterator.

“list”:

  • The template class for “list” class is “<list>”
  • The template class for “list” is “list<T>::iterator”.
    • This class uses mutable and bidirectional iterator.
  • The template class for constant iterator is “list<T>::const_iterator”.
    • This class uses constant and bidirectional iterator.
  • The template class for reverse iterator is “list<T>::reverse_iterator”.
    • This class uses mutable and bidirectional iterator.
  • The template class for constant reverse iterator is “list<T>::const_reverse_iterator”.
    • This class uses constant and bidirectional iterator.

vector”:

  • The template class for “vector” class is “<vector>”
  • The template class for “vector” is “vector<T>::iterator”.
    • This class uses mutable, random, and access iterator.
  • The template class for constant iterator is “vector<T>::const_iterator”.
    • This class uses constant, random, and access iterator.
  • The template class for reverse iterator is “vector<T>::reverse_iterator”.
    • This class uses mutable, random, and access iterator.
  • The template class for constant reverse iterator is “vector<T>::const_reverse_iterator”.
    • This class uses constant, random, and access iterator.

“deque”:

  • The template class for “deque” class is “<deque>”
  • The template class for “deque” is “deque<T>::iterator”.
    • This class uses mutable, random, and access iterator.
  • The template class for constant iterator is “deque<T>::const_iterator”.
    • This class uses constant, random, and access iterator.
  • The template class for reverse iterator is “deque<T>::reverse_iterator”.
    • This class uses mutable, random, and access iterator.
  • The template class for constant reverse iterator is “deque<T>::const_reverse_iterator”.
    • This class uses constant, random, and access iterator.

Blurred answer
Students have asked these similar questions
Write a short IO function, runTest, which runs your tests using quickCheck. (2 marks) runTest = undefined --Consider the following type which allows non-homogenous lists to be built. data MkType a b = ElemA a (MkType a b) | ElemB b (MkType a b) | Emptyderiving Show answer in haskell form. thank you.
Which of the following terms best describes the case where a Stack class is implemented using an internal instance of List? Choose only one option.(a) Association(b) Specialization(c) Genericity(d) Composition(e) Singularity
Write a short IO function, runTest, which runs your tests using quickCheck. runTest = undefined --Consider the following type which allows non-homogenous lists to be built. data MkType a b = ElemA a (MkType a b) | ElemB b (MkType a b) | Emptyderiving Show
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning