Differences between binary and text files in C

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

I really don't get why there are some dislikes. Nice video, and you brought very important points to pay attention... Thanks!

tapiocaferoz
Автор

For simplicity of serialization of data structures that contain pointers in binary you can write whole struct to disk, it's not a big deal for modern HDD or SSD to store few additional bytes. Let's assume perfect scenario: our program is working only on one architecture, so endianess and pointer size are the same. You still should'n use pointers after reading data structure, because they they will be pointing to wrong adress in memory 100% of time.

wiktorwektor
Автор

Thanks for your video, in this case I think endianess of the machine also can create some problem! am I right?

mohsenzare
Автор

So, is that why most games are still compiled in 32 bit with no option to 64 bits? because of the difference when reading and writing data?

rikkoo
Автор

Cant you just always write and read to files as binary files and treat numbers as strings where every digit is a char? I am studying Java right now and this is how I read and write to files most of the time

smrtfasizmu
welcome to shbcf.ru