O'Reilly logo

Object Oriented Programming with C++, Second Edition by Sunil Patekar, Mahesh Bhave

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

14.5 BINARY FILES

Earlier we have said that binary files are important because they are smaller in size and can be processed faster than corresponding text files. Binary files consist of bytes. Consider a case of a float value 123.45678. If we store it in a text file it will need 9 bytes. While reading this value, computer has to convert this string in to a float number. It needs some instructions. If we store this value in binary file it will need only four bytes. When computer reads these bytes, it loads them directly in to RAM memory. No conversion is required. We may say that in binary file we store memory images of variables.

Useful binary files consist of some component. By component, we mean either a simple data type or a structure or ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required