Question: cplusplus how to open file?
Answer: To open a file in binary mode, you just need to add the "binary" flag. ifstream in2("filename2. ext", ios_base::in | ios_base::binary ); Use the ifstream.