All pastes #362562 Raw Edit

Someone

public text v1 · immutable
·published 2007-02-18 22:25 UTC
rendered paste body
template < typename T >
void ToyBox < T >::PrintBoxSummary( ostream & out ) const
{

   //prints the number of items in the box
   out << endl << "ToyBox Contents" << endl;
   out << "--------------" << endl;
   out << "The ToyBox contains " << m_numToys << " of a possible ";
   out << m_capacity << " items" << endl;

   if( m_numToys > 0)
   {

      //prints out the number of distinct items in the box
      out << endl << "There are " << NumDistinctItems();
      out << " distinct items" << endl;

      for( unsigned int i = 0; i < m_toys.size(); i++ )
      {

	out << endl << m_toys.at(i).GetShape() << ", ";
	out << m_toys.at(i).GetColor(); 

      }

   }

}