// Using typename to emphasize that a dependent name (a name that depends on a template parameter) is a type name. #include #include #include int main(){ using namespace std; list lc; lc.push_back('a'); lc.push_back('b'); lc.push_back('e'); typename list::value_type x = 'c'; // A complicated way to denote the type char typename list::iterator lc_it = lc.begin(); // The iterator type of list typename list::size_type sz = lc.size(); // The size type of list }