From b04dd50e931cacf38e7bc275a6ce43834fd827ea Mon Sep 17 00:00:00 2001 From: Angel Dimitriev Date: Tue, 15 Mar 2022 20:11:28 +0200 Subject: Update array_of_students_read.cpp --- Sem. 03/array_of_students_read.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'Sem. 03/array_of_students_read.cpp') diff --git a/Sem. 03/array_of_students_read.cpp b/Sem. 03/array_of_students_read.cpp index ab1f425..655b38c 100644 --- a/Sem. 03/array_of_students_read.cpp +++ b/Sem. 03/array_of_students_read.cpp @@ -10,19 +10,6 @@ struct Student int fn; }; -void initStudent(Student& st, const char* name, int age, int fn) -{ - strcpy(st.name, name); - st.age = age; - st.fn = fn; -} - -void saveToFile(const Student* students, size_t count, ofstream& file) -{ - file.write((const char*)students, count * sizeof(Student)); -} - - size_t getFileSize(ifstream& f) { size_t currentPos = f.tellg(); @@ -53,4 +40,4 @@ int main() std::cout << "Name: " << arr[i].name << ", age: " << arr[i].age << ", fn: " << arr[i].fn << std::endl; delete[] arr; -} \ No newline at end of file +} -- cgit v1.3.1-23-gd82d