cpp open file in binary mode code example Example: fstream read write mode stream file; file.open(fileName,ios::in | ios::out);