Results 1 to 4 of 4

Thread: About binary files & streams & buffers...

  1. #1
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default About binary files & streams & buffers...

    I know that there is a QT meanly forum but I'm searching for tutorials or examples related to reading-writeing of binary files using streams and buffers.
    I dont find nothing really usefull.
    Some kind soul can help me ?

    Basically I'd want to do :
    open the binary file and
    read-write a long
    read-write a structure
    read-write a string
    read-write a fixed lenght string
    ....
    and I want to do this individually or using buffers.

    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: About binary files & streams & buffers...

    This is the correct part of the forum for such questions.
    Do you want to do this with qt or just plain C++?
    In Qt have a look at the following classes:
    QFile, QDataStream
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: About binary files & streams & buffers...

    Ja ja ja, Oh my god.
    I wrote I know that there is a QT meanly
    But I really wanted to write I know that here-this is a QT mainly
    Ups. (sorry for my bad english)
    Ok, Thanks High_FLyer
    First, as I'm learning C++... I'd want to do something with STL, later with QT.
    Thanks

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: About binary files & streams & buffers...

    STL or C++?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Advise sought on working with binary files across OSes
    By TorAn in forum General Programming
    Replies: 2
    Last Post: 19th September 2010, 06:44
  2. qrc-files: which binary formats are supported?
    By freeman_w in forum Qt Programming
    Replies: 5
    Last Post: 3rd September 2009, 16:31
  3. Reading Binary Files
    By archanasubodh in forum Newbie
    Replies: 1
    Last Post: 27th February 2008, 12:31
  4. How can I read Binary files with Qt
    By geo_saleh in forum Qt Programming
    Replies: 2
    Last Post: 16th August 2007, 10:37
  5. Concatenating two binary files
    By nbkhwjm in forum Newbie
    Replies: 13
    Last Post: 23rd April 2007, 03:30

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.