How do I open binary files?

Answer Posted / guest

do a bitwise or of the file open mode with ios::binary, as in:

ifstream mystream( "filename.ext", ios::in | ios::binary );

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between array and vector in c++?

752


What does it mean to declare a member function as static?

833


What is the difference between new() and malloc()?

1221


What do you mean by late binding?

843


What is ios flag in c++?

884


Can you overload the operator+ for short integers?

805


What does scope resolution operator do?

806


Who made c++?

821


What is difference between n and endl in c++?

781


Why cout is used in c++?

768


Snake Game: This is normal snake game which you can find in most of the mobiles. You can develop it in Java, C/C++, C# or what ever language you know.

2779


Can a program run without main function?

893


What is the difference between cin.read() and cin.getline()?

825


Why we use #include conio h in c++?

796


If dog is a friend of boy and boy is a friend of house, is dog a friend of house?

759