Hi This is really a general C++ question, but I have looked long and hard and not worked it out. In the code below how should I initialise v.v using the QScopedPointer?
#include <QScopedPointer> class abc { }; class a : public abc { }; class x { public: QScopedPointer<abc> v; }; int main() { x y; y.v = new a; // error: C2679: binary '=' : no operator found which takes a right-hand operand of type 'a *' (or there is no acceptable conversion) y.v = dynamic_cast<QScopedPointer<abc>>(new a); // error: C2680: 'QScopedPointer<T>' : invalid target type for dynamic_cast } Thanks for any help. -- Regards Alex _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest