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

the first character in the variable name must be an a) special symbol b) number c) alphabet

859


Why do we use constructor?

840


Explain dangling pointer.

894


What is the use of volatile variable?

862


What is the difference between a definition and a declaration?

840


How do you write a function that can reverse a linked-list?

826


How compile and run c++ program in turbo c++?

881


What is the difference between while and do while loop? Explain with examples.

870


What is the difference between the functions rand(), random(), srand() and randomize()?

973


Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;

1758


Why the usage of pointers in C++ is not recommended ?

1129


Which is the best c++ compiler?

809


What is stoi in c++?

945


Differentiate between structure and class in c++.

817


What is overloading unary operator?

844