Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- class Author
- {
- char* name;
- int booksCount;
- char* nationality;
- void copy(char* name, int booksCount, char* nationality);
- void copy(const Author& author);
- void destroy();
- public:
- Author(char* name="Ivan",int booksCount=0,char* nationality="Bulgarian");
- ~Author();
- Author(const Author& author);
- Author& operator=(const Author& author);
- char* getName() const;
- void setName(char* name);
- int getBooksCount()const;
- void setBooksCount(int booksCount);
- char* getNationality()const;
- void setNationality(char* nationality);
- void print();
- bool operator<(const Author& author)const;
- bool operator>(const Author& author)const;
- bool operator<=(const Author& author)const;
- bool operator>=(const Author& author)const;
- bool operator!=(const Author& author)const;
- bool operator==(const Author& author)const;
- friend std::istream& operator>>(std::istream& is, Author& author);
- friend std::ostream& operator<<(std::ostream& os, const Author& author);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement