Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 03 / students_staticName_to_binary.cpp
diff options
context:
space:
mode:
1 files changed, 1 insertions, 1 deletions
-rw-r--r--Sem. 03/students_staticName_to_binary.cpp2
diff --git a/Sem. 03/students_staticName_to_binary.cpp b/Sem. 03/students_staticName_to_binary.cpp
index 8f84d79..1047321 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);
- file.write((const char*)&st, sizeof(st));
+ file.write((const char*)&st, sizeof(st)); //since the data is grouped in the struct, we can save it like this.
}
{ //read