hi everyone,

may I request a sample code on how to read/write a binary file in C++.

Thanks.

Re: sample code on how to read binary file using C++ 80 80
#include <fstream>
...
std::ifstream myfile("blah.txt", std::ios::binary | std::ios::in);

Chris

Re: sample code on how to read binary file using C++ 80 80

hey chris thanks for the code, I really appreaciate it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.