| Illustration of the use of member types for a list of chars. | Lecture 5 - slide 28 : 39 Program 1 |
#include <iostream>
#include <string>
#include <list>
int main(){
using namespace std;
list<char> lc;
lc.push_back('a'); lc.push_back('b'); lc.push_back('e');
list<char>::value_type x = 'c'; // A complicated way to denote the type char
list<char>::iterator lc_it = lc.begin(); // The iterator type of list<char>
list<char>::size_type sz = lc.size(); // The size type of list<char>
}