Search Result

Collapse
2 results in 0.0013 seconds.
Keywords
Members
Tags
binary file
  •  

  • mohammed alhadi
    started a topic Error in reading fom a binary file!
    in C

    Error in reading fom a binary file!

    Hi All,

    Can any body tell me how to fix the errors in this program? I am reading integer values from a binary file and displaying them!

    Code:
    int i;
    ifstream::pos_type size;
    		
    		ifstream pBinaryFile ("binaryfile.bin", ios::in|ios::binary|ios::ate); //other format to read from the binary file
    
             
    		if (!pBinaryFile)
    		{
    			printf("Unable to open file!");
    ...
    See more | Go to post
    Last edited by Niheel; May 13 '11, 02:16 PM.

  • 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
Working...