How do I open binary files?



How do I open binary files?..

Answer / 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

More C++ General Interview Questions

How do you invoke a base member function from a derived class in which you’ve overridden that function?

0 Answers  


What is a protocol class?

1 Answers  


How do you flush a buffer in c++?

0 Answers  


Assume studentNames and studentIDs are two parallel arrays of size N that hold student data. Write a pseudocode algorithm that sorts studentIDs array in ascending ID number order such that the two arrays remain parallel.

0 Answers  


what kind of projects are suitable for c and c++

0 Answers  


Can c++ be faster than c?

0 Answers  


How do you clear a set in c++?

0 Answers  


Is there any problem with the following: char *a=NULL; char& p = *a;?

1 Answers  


Explain binary search.

0 Answers  


What do you understand by zombie objects in c++?

0 Answers  


Can a constructor be private?

0 Answers  


In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest.

5 Answers   GE,


Categories