// ========================================================================== // Implementation for a string array with random selection // A. Fischer, June 4, Nov 14, 2000 file: rstrings.cpp // Modified by M. Fischer, October 8, 2009 //=========================================================================== #include "tools.hpp" #include "rstrings.hpp" // ========================================================================== RandString::RandString( istream& vocin, int sz ): FlexArray (sz) { //cerr << "\nConstructing RandString "; n=0; maxData=sz; char line[80]; // input buffer srand( time( NULL ) ); // start up random number generator. for(;;) { vocin >> ws; vocin.getline( line, 80 ); if (!vocin.good()) break; put(line, vocin.gcount()); // store the string } //cerr << "\nRead " <