/* Read fills a vector<T> with input from a stream.
 *
 * Receives:     type parameter T,
 *               an istream and a vector<T>
 * Precondition: operator >> is defined for type T
 * Passes back:  the modified istream and the modified vector<T>
 *****************************************************************/

template <class T>
void Read(istream & in, vector<T> & theVector)
{
   T inputValue;

   for (;;)
   {
      in >> inputValue;
      if (in.eof()) break;
      theVector.push_back(inputValue);
   }
}

