Listing 8 An operator<< for strq using the new apply function(s) instead of a global variable

void print_str(void *e, void *args)
   {
   *(ostream *)args << ' ' << *(str *)e;
   }

inline ostream &operator<<(ostream &os, strq &q)
   {
   q.apply(print_str, &os);
   return os;
   }

// End of File