×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    May 2007
    Location
    Slovakia
    Posts
    12

    reading binary file, load values as int

    So, hi at all. Im new in c++ (symbian). Please, if you know the answer, help me.

    I will to read data from binary file, and load it as int value.

    For example: (file) ...A1...

    In the code i need to load the values A1 as (int) 70, 46.

    The Read fnc works only with TDes8, right?

    Exmpl:
    ...
    TBuf8<1> Var;

    MojSubor.Open(fs,file,EFileRead);

    MojSubor.Seek(ESeekStart,offset);
    MojSubor.Read(Var,1); // reading single char works good

    TInt NeededInteger;
    // now how to read as int?
    ...

    I have been read the SDK, but my english is not 100%
    Thanks for all usable answers.

  2. #2
    Super Contributor
    Join Date
    May 2003
    Location
    Vancouver, Canada
    Posts
    985

    Re: reading binary file, load values as int

    You can use RFileReadStream::ReadInt32L() or some other variants of it.
    Just check RFileReadStream on the SDK Help.

    Antony

Similar Threads

  1. [announce] PyUIQ. Python for UIQ 2.1 and 3.x
    By OscarBernabeu in forum Symbian
    Replies: 35
    Last Post: 2008-01-17, 09:12
  2. Replies: 1
    Last Post: 2006-08-28, 16:07
  3. Replies: 1
    Last Post: 2005-05-26, 14:22
  4. ROM file reading too short
    By itsxbv in forum Symbian
    Replies: 0
    Last Post: 2004-06-17, 11:48
  5. Replies: 0
    Last Post: 2002-06-10, 12:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×