Reputation: 149
How can I make program in C++ that will read .exe or another file in binary code?
Upvotes: 2
Views: 8728
Reputation: 132974
#include <fstream>
int main()
{
std::ifstream in("yourfile.exe", std::ios::in | std::ios::binary);
///
in.read (buffer, buffer_size);
}
For a detailed example on how to read binary files in C++, see this link or do your own googling.
Upvotes: 6