The following code shows how to read a binary file in C++. This is a quick example and doesn’t contain much error handling and if you’re using Visual Studio, make sure you set the appropriate character set:
Right-click on your project in the Solution Explorer and click Properties.
Select Configuration Properties -> General.
Set the Character Set to Use Multi-Byte Character Set.