| | |
Binary File Parser
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
C or C++?
C++ Binary File I/O - Basically using ifstream/ofstream with special initalization parameters and using ::write and ::read to do file i/o instead of the stream operators (<< and >>).
C Binary File I/O - Using fopen(), but using fread() and fwrite() instead of fputs() and fgets() to read files.
Hope this helps
C++ Binary File I/O - Basically using ifstream/ofstream with special initalization parameters and using ::write and ::read to do file i/o instead of the stream operators (<< and >>).
C Binary File I/O - Using fopen(), but using fread() and fwrite() instead of fputs() and fgets() to read files.
Hope this helps
"Technological progress is like an axe in the hands of a pathological criminal."
All my posts may be freely redistributed under the terms of the MIT license.
All my posts may be freely redistributed under the terms of the MIT license.
you have to know the format of the files before you can parse them. There normally is nothing in the file that says "I'm a header record". You have to know that bytes 0 to ??? is the header record, if one even exists in the file. Evey binary file is different, there is no standard way to write or read them other than how to use stream.write() and stream.read() functions. And those functions are completly ignorent of what it is reading or writing. That's all up to the programmer.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
•
•
•
•
you have to know the format of the files before you can parse them. There normally is nothing in the file that says "I'm a header record". You have to know that bytes 0 to ??? is the header record, if one even exists in the file. Evey binary file is different, there is no standard way to write or read them other than how to use stream.write() and stream.read() functions. And those functions are completly ignorent of what it is reading or writing. That's all up to the programmer.
Hope this helps
"Technological progress is like an axe in the hands of a pathological criminal."
All my posts may be freely redistributed under the terms of the MIT license.
All my posts may be freely redistributed under the terms of the MIT license.
![]() |
Similar Threads
- Read a string from a binary file into a C or C++ string (C++)
- Reading a Binary file using Visual Basic (Visual Basic 4 / 5 / 6)
- Reading a Binary File to a C++ Class (C++)
- binary file manipulations (C)
- C++ raster files (writing structs to a binary file) (C++)
Other Threads in the C++ Forum
- Previous Thread: Totally lost in functions!
- Next Thread: Entering X numbers separated by spaces into an array
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays assignment beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll email encryption error file format forms fstream function functions game generator getline givemetehcodez graph iamthwee ifstream image input int java lazy lib loop looping loops map math matrix memory multidimensional multiple newbie news node number numbertoword output pointer problem program programming project proxy python random read recursion recursive reference return sort sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






