home *** CD-ROM | disk | FTP | other *** search
- #if !defined( STUDENT_INCLUDED )
- #define STUDENT_INCLUDED
-
- #include <string>
- #include <iostream>
- #include <fstream>
-
-
- const int LENSTR=128;
- const int LENDOB=12;
-
- struct SStudent {
- unsigned
- unsigned m_studNo;
- char m_familyName[LENSTR];
- char m_otherNames[LENSTR];
- char m_address[LENSTR];
- char m_DOB[LENDOB];
- };
-
- class CStudent {
- public:
- CStudent();
- CStudent(unsigned sNo,
- const std::string &fNam,
- const std::string &oNam,
- const std::string &addr,
- const std::string &DOB);
- unsigned StudentNo() const;
- const std::string &FamilyName() const;
- const std::string &OtherName() const;
- const std::string &Address() const;
- const std::string &DOB() const;
- bool Read(std::ifstream &is);
- bool Write(std::ofstream &os);
- bool Print(std::ostream &os);
- private:
- unsigned m_studNo;
- std::string m_familyName;
- std::string m_otherNames;
- std::string m_address;
- std::string m_DOB;
- };
-
-
-
- #endif