What is the difference between text and binary files. How do you decide when to use what?

what is the difference between text and binary files. How do you decide when to use what?

For example, if you need to read pcm samples from an audio file that contains raw data, in what mode will you open the file in?

+3
source share
1 answer

First of all, the difference between text and binary does not exist, in the sense that you can open any file in binary mode text if you choose. When you open a file in text mode in C or use text stream operations in C ++, then the operations take into account text functions, such as line endings, so you can ask questions like readline ().

, , , , " " ( ).

+1

All Articles