please i want to know how to write binary file with different datatypes in C++ and also how to read them back