Results 1 to 4 of 4

Thread: basic C++ question

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: basic C++ question

    Also, pointers need something to point at. In your original code, you declare a pointer, but you don't allocate any memory for it to point at, as in

    Qt Code:
    1. p = new int;
    To copy to clipboard, switch view to plain text mode 

    Without this step, you can't assign anything to p because there is no memory to hold the value.

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

    Maluko_Da_Tola (23rd August 2010)

Similar Threads

  1. very basic Qt/c++ question
    By Maluko_Da_Tola in forum Newbie
    Replies: 2
    Last Post: 25th July 2010, 14:02
  2. A few basic question
    By salmanmanekia in forum Newbie
    Replies: 12
    Last Post: 17th June 2010, 07:46
  3. Basic question
    By giacomelli.fabio in forum Newbie
    Replies: 4
    Last Post: 18th December 2009, 00:12
  4. Basic QtScript question
    By jimboqt in forum Newbie
    Replies: 0
    Last Post: 23rd September 2008, 14:09
  5. Using QSA: A very basic question
    By yogeshm02 in forum Newbie
    Replies: 3
    Last Post: 26th January 2006, 07:34

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.