summaryrefslogtreecommitdiffstats
path: root/Bachelor/Prog2/person-tree/Person.h
diff options
context:
space:
mode:
authorSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
committerSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
commit33613a85afc4b1481367fbe92a17ee59c240250b (patch)
tree670b842326116b376b505ec2263878912fca97e2 /Bachelor/Prog2/person-tree/Person.h
downloadStudium-master.tar.gz
Studium-master.tar.bz2
add new repoHEADmaster
Diffstat (limited to 'Bachelor/Prog2/person-tree/Person.h')
-rw-r--r--Bachelor/Prog2/person-tree/Person.h27
1 files changed, 27 insertions, 0 deletions
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 <iostream>
+#include <string>
+
+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