reading/writing binary files using << / >>

I am new to C++ and want to learn about binary files.

I am trying to write/read to a binary file using the insertion/extraction operators. I would like for the functions to be in the class itself. I am writing the data to the binary file and then choosing which object I want to read from the file. The data will be different lengths.

Thanks for any help.
DO you already knows how to do it?
Do you know use OO C++?
closed account (S6k9GNh0)
Ggreat answer Rithie! And for a month old post as well...
closed account (z05DSL3A)
I think he (Rithie) is asking if it was answered, as his other post[1] is about this sort of thing. possibly.

[1] http://www.cplusplus.com/forum/beginner/11110/

Sorry!!! I'm beginner on this forum, I registered a few minutes ago.
I was just wanting to help...
and answer the exercisephiend....
I am using OOC++, and I am a beginner at C++.

No. I haven't received a reply since now. I just moved on, but I would like to know how to solve the issue.

Thanks,
OOC++
Wait, so there's a NOO C++, now?

What you're trying to do is not exactly easy. Not for a beginner, anyway.
Google serialization, that's what it's called when you convert an in-memory data structure, such as an object, into a stream of bytes, such as a file, and viceversa.

(http://www.cplusplus.com/forum/beginner/11110/)
Although I see you got the same reply from Duoas.
Topic archived. No new replies allowed.