From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- Bachelor/Prog2/person-tree/Person.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Bachelor/Prog2/person-tree/Person.h (limited to 'Bachelor/Prog2/person-tree/Person.h') diff --git a/Bachelor/Prog2/person-tree/Person.h b/Bachelor/Prog2/person-tree/Person.h new file mode 100644 index 0000000..a840996 --- /dev/null +++ b/Bachelor/Prog2/person-tree/Person.h @@ -0,0 +1,27 @@ +// Person.h: Interface for class Person + +#if !defined PERSON_H +#define PERSON_H + +#include +#include + +class Person { + + friend std::ostream& operator<<( std::ostream&, const Person& ); + +public: + Person( std::string = "", std::string = "" ); // default constructor + bool operator<( const Person& ) const; + bool operator>( const Person& right ) const + { + return right < *this; + } + +private: + std::string firstName; + std::string lastName; + +}; + +#endif // !defined PERSON_H -- cgit v1.2.3