hi everyone,

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

Thanks.

#include <fstream>
...
std::ifstream myfile("blah.txt", std::ios::binary | std::ios::in);

Chris

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.