From 0e4f43de314c7e4afedda6a7126d91c0d7709a80 Mon Sep 17 00:00:00 2001 From: Angel Dimitriev Date: Wed, 16 Mar 2022 02:30:21 +0200 Subject: Update students_staticName_to_binary.cpp --- Sem. 03/students_staticName_to_binary.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Sem. 03/students_staticName_to_binary.cpp') diff --git a/Sem. 03/students_staticName_to_binary.cpp b/Sem. 03/students_staticName_to_binary.cpp index 51fb711..569bcff 100644 --- a/Sem. 03/students_staticName_to_binary.cpp +++ b/Sem. 03/students_staticName_to_binary.cpp @@ -22,7 +22,7 @@ int main() ofstream file("student.dat", ios::binary); - if (!file.open()) + if (!file.is_open()) { cout << "Error while writing to binary file!" << endl; return -1; @@ -35,7 +35,7 @@ int main() Student st; ifstream file("student.dat", ios::binary); - if (!file.open()) + if (!file.is_open()) { cout << "Error while reading from binary file!" << endl; return -1; -- cgit v1.3.1-23-gd82d