View Full Version : QVector arguments

4th December 2007, 04:59
Hi all. I ve the following codes.

QVector<IVerzweigungPtr> lVecVerzweigungen (0);
IVerzweigungLocalPtr l_IVerzweigung;
where IVerzweigungLocalPtr is std::auto pointer.

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

Can any body help me.?

Khal Drogo
4th December 2007, 10:07

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.

4th December 2007, 11:47
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).