From 00fe74ecb2cb5f7cc8913f6afc2e0e142efb4e0c Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 2 May 2022 09:35:22 +0300 Subject: Autocommit at 02.05.2022 @ 09:35 --- src/List/List.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/List/List.cpp') diff --git a/src/List/List.cpp b/src/List/List.cpp index 5a0e1f2..1f3540f 100644 --- a/src/List/List.cpp +++ b/src/List/List.cpp @@ -77,6 +77,12 @@ std::istream& List::read(std::istream& istr) { template std::ostream& List::write(std::ostream& ostr) const { + ostr.write((const char*)&length, sizeof(length)); + ostr.write((const char*)&count, sizeof(count)); + + for (int i = 0; i < count; i++) + elements[i].write(ostr); // disgusting + return ostr; } -- cgit v1.3.1-23-gd82d