Results 1 to 5 of 5

Thread: Application crashes when I delete the character pointer array

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,540
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanked 284 Times in 279 Posts

    Default Re: Application crashes when I delete the character pointer array

    Because You are deleting internal data of QByteArray.
    I think line 6 should be :
    Qt Code:
    1. strcpy(testarr,br.data());
    To copy to clipboard, switch view to plain text mode 

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

    arunkumaraymuo1 (12th February 2013)

Similar Threads

  1. Replies: 5
    Last Post: 13th March 2021, 09:07
  2. Delete character from file
    By kaszewczyk in forum Newbie
    Replies: 2
    Last Post: 11th March 2010, 18:07
  3. qstringlist array crashes program
    By chrisb123 in forum Newbie
    Replies: 4
    Last Post: 23rd October 2009, 15:03
  4. QVector crashes when array size is big
    By Sheng in forum Qt Programming
    Replies: 49
    Last Post: 27th February 2009, 22:13
  5. How to create QPixmap from unsigned character array?
    By rashidbutt in forum Qt Programming
    Replies: 4
    Last Post: 16th May 2006, 18:25

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.