Results 1 to 8 of 8

Thread: Struct in network

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2008
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Struct in network

    thats a mistake its actually...
    Qt Code:
    1. ud.ue=lineedit->text().toAscii().data();
    2. ud.pd=lineedit1->text().toAscii().data();
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Struct in network

    Quote Originally Posted by sribalaji View Post
    thats a mistake its actually...
    Qt Code:
    1. ud.ue=lineedit->text().toAscii().data();
    2. ud.pd=lineedit1->text().toAscii().data();
    To copy to clipboard, switch view to plain text mode 
    But it doesn't change the fact that you are still storing a pointer to something that doesn't exist after that particular line has been executed.
    J-P Nurmi

  3. #3
    Join Date
    Mar 2008
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Struct in network

    but the value is getting stored.

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Struct in network

    It's a pointer to data which has been destroyed.
    J-P Nurmi

Similar Threads

  1. Replies: 16
    Last Post: 23rd May 2008, 11:12
  2. Checking network availability
    By fullmetalcoder in forum Qt Programming
    Replies: 2
    Last Post: 10th March 2008, 20:23
  3. Make error with Qt Jambi 4.3.2_01
    By pamalite in forum Installation and Deployment
    Replies: 0
    Last Post: 22nd November 2007, 13:05
  4. QSocket - signal for network wire disconnection
    By manivannan_1984 in forum Qt Programming
    Replies: 7
    Last Post: 5th September 2006, 14:52
  5. memset struct with QString elements
    By Timewarp in forum Qt Programming
    Replies: 2
    Last Post: 5th February 2006, 02:48

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.