template <class S>
class Iterator {

public:

  S stack;

  void advance() { stack.push(0); }

};

template <class T>
class Stack {

public:

  T *t;
  int sp;

  void push(const T &e) { t[sp++] = e; }
  void push() { t[sp++] = (T)0; }

};

int main() { Iterator< Stack<int> > i; i.advance(); return 0; }