Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading a binary file

Status
Not open for further replies.

reneb

Programmer
Aug 8, 2000
43
US
I need to read a binary file to get some values. I have seen that CStdio supports binary by setting a flag for opening a file for input in binary. I can later use the Read function that would read the specified bytes and write them to a char array. Can these bytes be written into another data type like an int or double? If yes, how? If no, how do I convert the char array to another data type, through normal casting or through what means? Please help. Any procedure for doing this will be greatly appreciated. Thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top