Results 1 to 3 of 3

Thread: Saving data as a .txt file using a for loop

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,316
    Thanks
    314
    Thanked 870 Times in 857 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Saving data as a .txt file using a for loop

    In the for() loop on line 22 of datalogger.cpp, you have not initialized the loop variable "i" to anything, so it has a random value. This is almost certainly outside of the range of your datastream object's content, so trying to retrieve the input from that location crashes.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  2. The following user says thank you to d_stranz for this useful post:

    VitaminG (23rd January 2017)

Similar Threads

  1. Saving two data sets to the same file
    By amirlevi in forum Newbie
    Replies: 3
    Last Post: 31st August 2016, 12:08
  2. Saving Model Data to XML
    By Jarrod in forum Newbie
    Replies: 2
    Last Post: 14th August 2016, 10:15
  3. Saving Data as XML
    By aIsmail in forum Newbie
    Replies: 1
    Last Post: 18th November 2015, 08:14
  4. Replies: 1
    Last Post: 22nd September 2010, 15:39
  5. Saving pure plot data to image file
    By Debilski in forum Qwt
    Replies: 4
    Last Post: 7th April 2009, 17:02

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.