home *** CD-ROM | disk | FTP | other *** search
/ PC User 2001 August / APC_Aug2001_CD1.iso / workshop / c / files / Roll.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-06-03  |  585 b   |  26 lines

  1. #if !defined( ROLL_INCLUDED )
  2. #define ROLL_INCLUDED
  3.  
  4. #include "Student.h"
  5. #include <vector>
  6.  
  7. class CRoll {
  8. public:
  9.    CRoll(const std::string &fname);
  10.    ~CRoll();
  11.    bool Add(const CStudent &s);
  12.    bool Find(unsigned studNo);
  13.    bool Find(unsigned studNo, CStudent &s);
  14.    bool Delete(unsigned studNo);
  15. private:
  16.    typedef std::vector<CStudent> data_t;
  17.    typedef data_t::iterator data_it;
  18.    const std::string m_fname;
  19.    const std::ios_base::openmode m_openmode;
  20.    data_t m_data;
  21.    bool Read();
  22.    bool Write();
  23.    data_it Get(unsigned studNo);
  24. };
  25.  
  26. #endif