Files
Datastructs/Exam/IKT203Exam/Portfolio/SharedLib/TPerson.h
Christopher Sanden e761ac0e23 Completed part 2
2025-11-06 22:48:14 +01:00

34 lines
691 B
C++

#ifndef IKT203_COURSE_ASSIGNMENTS_TPERSON_H
#define IKT203_COURSE_ASSIGNMENTS_TPERSON_H
#include <string>
#include "Utils.h"
enum ENumStatus {
GUEST,
EMPLOYEE
};
struct TPerson {
std::string firstName;
std::string lastName;
ENumStatus status;
int cabinSize{};
TPerson();
TPerson(std::string , std::string , ENumStatus);
~TPerson() = default;
bool operator<(const TPerson& other) const
{
if (lastName < other.lastName) return true;
if (lastName > other.lastName) return false;
// same last name → compare first name
return firstName < other.firstName;
}
};
#endif //IKT203_COURSE_ASSIGNMENTS_TPERSON_H