Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] ftell() and fseek()
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] ftell() and fseek()

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 3.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Salvatello
    wrote on last edited by
    #1

    I have a code in C and I'd like to translate it to qt;
    @FILE * f;
    ftell (f); @
    as is reflected in QT?
    @fseek (f, key, SEEK_CUR) @
    as is reflected in QT?

    1 Reply Last reply
    0
    • siropS Offline
      siropS Offline
      sirop
      wrote on last edited by
      #2

      Have a look at peek(), seek() and pos() at
      http://qt-project.org/doc/qt-5/qfile-members.html .

      To be, or not to be: that is the question:
      Whether ’tis nobler in the mind to suffer
      The slings and arrows of outrageous fortune,
      Or to take arms against a sea of troubles,
      And by opposing end them?

      1 Reply Last reply
      0
      • IamSumitI Offline
        IamSumitI Offline
        IamSumit
        wrote on last edited by
        #3

        Hi.
        ftell (f) --->QIODevice::pos();
        fseek (f, key, SEEK_CUR)--->bool QIODevice::seek(qint64 pos) [virtual]

        hope this helps.

        Be Cute

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Salvatello
          wrote on last edited by
          #4

          thanks sirop and lamSumit

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved