How to read 'long long' from binary file?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Andrew
le 25 Mar 2014
Réponse apportée : James Tursa
le 25 Mar 2014
Hello community,
I've got a binary file which was written with C++. How can I read a number in 'long long' format (8 bytes)? In the Matlab help I found only this info:
reading binary file with function _ fread(fileID, sizeA, precision)_ where precision could be only 'long' (in my case), but this is only 4 bytes.
Thanks in advance!
Andrew
0 commentaires
Réponse acceptée
James Tursa
le 25 Mar 2014
For precision use '*int64'. If the file was written on a different machine you may need to deal with endian stuff as well.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Data Type Conversion dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!