From b91fe701898aa12d3ec3b67a94216f64bbfd2612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=BB=D1=8C=D1=8F=20=D0=91=D0=BE=D0=B3=D0=B4=D0=B0?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2?= Date: Sat, 13 Nov 2021 17:57:20 +0000 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=BC=D0=B5=D1=87=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=BF=D0=BE=20TravelCompany.h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Streams and STL/TravelCompany.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Streams and STL/TravelCompany.h b/Streams and STL/TravelCompany.h index 147af67..aa95d30 100644 --- a/Streams and STL/TravelCompany.h +++ b/Streams and STL/TravelCompany.h @@ -7,7 +7,7 @@ class TravelCompany { private: struct Data { - std::string tour_name; + std::string tour_name; //!!! Для корректной работы с бинарными файлами нужно использовать статические массивы char name[64], например. std::string surname; int price; int days; @@ -47,6 +47,8 @@ private: bool operator == (const Data& data) { + + //!!! Убрать лишние this return (this->tour_name == data.tour_name && this->surname == data.surname && this->price == data.price && -- GitLab