Hi guys, I have question. I haven’t program in c++ in over 5 years last time I was programming I was learning the langrage in school. I now have jump back into programming in c++ and i am trying to make a program that would be able to read a binary file and get the data from it. so i can save it to a text file.
I can not change the format of the file it has already been set a long time ago.Code:This is how the data is structured. ------------------------------------------------ Size (Bytes) Name Type Description -------the structure of the file-------------------------------------------- 4 Signature char[4] File Signature ('logi') no terminating null 4 version uint32 File Format Version 4 count uint32 Number of entries that follow Variable entries ----------------------------------------------------- 1 namelenth uint8 Length of name namelenth name char[] name (nameLength characters) no terminating null 6 id uint8[6] HEXVALUE 8 FILETIME FILETIME 100-nanosecond increments since January 1, 1601 (UTC). 64-bit integer ------------------------------------------------------------------------ here is a hex example of the file(paste it in to your hex editor and save it) ------------------------------------ 6C6F676905000000010000000D5468697369737468656E616D65000A11F1D11160992BFCD425C901 ------------------------------------ Lets break it down ---------------------------------------------------------- 6C6F6769 = logi Signature 05000000 = 5 version 01000000 = 1 count ---------------------------------------------------------- 0D = 13 namelenth 5468697369737468656E616D65 = Thisisthename name 000A11F1D111 = 000A11F1D111 HEXVALUE hex value of name 60992BFCD425C901 = 3:55:05 AM 10/4/2008 FILETIME ---------------------------------------------------------- Signature = logi version = 5 count = 1 namelenth = 13 name = Thisisthename HEXVALUE = 000A11F1D111 FILETIME = 3:55:05 AM 10/4/2008 ---------------------------------------
I am not looking for anybody to do this program for me I am just trying to be point in the
Right direction.
By the way I don’t have access to visual studio.net IDE
Currently I am using the free IDE "Bloodshed Software - Dev-C++"
I need to make this program work with Linux and windows. windows whould be fine right now and it has to be in c/c++
Any help will be greatly appreciated. thank you.
--------------------------------------------------------------------------------