diff options
Update simple_struct_binary.cpp
1 files changed, 1 insertions, 1 deletions
| -rw-r--r-- | Sem. 03/simple_struct_binary.cpp | 2 |
diff --git a/Sem. 03/simple_struct_binary.cpp b/Sem. 03/simple_struct_binary.cpp index 6ee16de..2f0bafc 100644 --- a/Sem. 03/simple_struct_binary.cpp +++ b/Sem. 03/simple_struct_binary.cpp @@ -17,7 +17,7 @@ int main() Test t = { true, 45 }; ofstream file("testObj.bat", ios::binary); - file.write((char*)&t, sizeof(t)); + file.write((char*)&t, sizeof(t)); //since the data is grouped in the struct, we can save it like this. } { //read |
