Question
Book Icon
Chapter 18.2, Problem 8STE
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
C++ Create a generic function increment(start, stop, x) that adds x to every element in the range [start,stop). The addition is done using the + operator. The arguments start and stop are bidirectional iterators. Write a test driver.
Create an Unordered and Ordered Linked list type Template completed with a test program.
How does the function insertFirst of the class unorderedLinkedList differ from the function insertFirst of the class orderedLinkedList.
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