diff options
Update students_staticName_to_binary.cpp
1 files changed, 2 insertions, 2 deletions
| -rw-r--r-- | Sem. 03/students_staticName_to_binary.cpp | 4 |
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; |
