Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt 5.8.0 when use feof to detect the end of a file , the qt app is crumbling
Forum Updated to NodeBB v4.3 + New Features

Qt 5.8.0 when use feof to detect the end of a file , the qt app is crumbling

Scheduled Pinned Locked Moved Solved Mobile and Embedded
4 Posts 2 Posters 1.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.
  • A Offline
    A Offline
    Alex_wang
    wrote on last edited by
    #1

    Qt 5.8.0 when use feof to detect the end of a file , the qt app is crumbling

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Can you provide any more info? What is the error? Can you provide code sample?

      In QFile, you don't need to check with feof.

      (Z(:^

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Alex_wang
        wrote on last edited by sierdzio
        #3

        qt app is running on ubuntu 16.04.
        this has been sovled:
        the error code:

         while (!feof(m_File))
          {
                m_File =  fread(....) ;   
          }
        

        the right code :

        do
        {
             m_File =  fread(....) ;   
        } while (!feof(m_File));
        
        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          OK, thanks for info.

          So it was not connected with Qt at all.

          (Z(:^

          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