Results 1 to 3 of 3

Thread: QVector arguments

  1. #1
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question QVector arguments

    Hi all. I ve the following codes.

    Qt Code:
    1. QVector<IVerzweigungPtr> lVecVerzweigungen (0);
    2. IVerzweigungLocalPtr l_IVerzweigung;
    To copy to clipboard, switch view to plain text mode 
    where IVerzweigungLocalPtr is std::auto pointer.

    while im doing lVecVerzweigungen.push_back(*l_IVerzweigung); its throwing error.

    Can any body help me.?
    Last edited by marcel; 4th December 2007 at 08:44. Reason: missing [code] tags
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

  2. #2
    Join Date
    Nov 2007
    Posts
    51
    Thanks
    2
    Thanked 2 Times in 2 Posts

    Default Re: QVecotr arguments

    Greetings.

    1. What exactly is the type of IVerzweigungLocalPtr and IVerzweigungPtr? auto is a storage class specifier, unless im mistaken.
    2. The vector needs IVerzweigungPtr elements, and you try to add a IVerzweigungLocalPtr. Furthermore, if the type names are correctly describing the type, you actually try to add a non pointer to a vector of pointers.

    Please write more info, so i dont have to assume things.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QVecotr arguments

    Why have all the people started using auto pointers in containers? Is it some academic task or something? Please browse the forum, the issue is been brought up at least two time during the last month (one of the threads was updated yesterday or two days ago).
    Last edited by wysota; 4th December 2007 at 10:53. Reason: corrected grammar mistake

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.