User Profile

Collapse

Profile Sidebar

Collapse
PatriDa
PatriDa
Last Activity: Feb 12 '10, 10:19 AM
Joined: Jan 18 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • PatriDa
    replied to Reading from a binary file
    in C
    Thanks for your answers, Banfa and donbock!!!

    As I had a deadline, I couldn't spend so much time in solving this problem, so finally I managed it in other way.... Just to inform, I delayed the time of reading from the file, until I really knew the type of data I was supossed to read. I just stored the positions in the file where I had to read and how many values.

    I encountered many problems when trying to read float...
    See more | Go to post

    Leave a comment:


  • PatriDa
    replied to Reading from a binary file
    in C
    Thanks Banfa for your quick reply.... If I understood right, I should use an unsigned char array to store what I read from the file. But I still have doubts...

    Let me show you an example:
    I'm supposed to read from the data file 16388 bytes, and then interpret them as 8192 short values, 2bytes per value, (there are 4bytes at the end of the data block that are not valid data). What I'm doing right now is:

    Code:
    
    
    ...
    See more | Go to post

    Leave a comment:


  • PatriDa
    started a topic Reading from a binary file
    in C

    Reading from a binary file

    I need to read form a binary file, which stores data, an array of bytes, but without interpreting them (I mean: I cannot read them as int, or double....). I need them just as bytes. Later on, I will be able to interpret them as corresponds, because I will have information about the data type, so I can say "read them as int or as double".

    Can anyone help me, and explain me which is the best way to read them? I have thought to...
    See more | Go to post
No activity results to display
Show More
Working...