I've solved it changin the line
Square(rhs.left(),rhs.up(),rhs.right(),rhs.down());
Square(rhs.data()[left],rhs.data()[UP],rhs.data()[right],rhs.data()[DOWN]);
But I would want to know why the other line fails.
I've solved it changin the line
Square(rhs.left(),rhs.up(),rhs.right(),rhs.down());
Square(rhs.data()[left],rhs.data()[UP],rhs.data()[right],rhs.data()[DOWN]);
But I would want to know why the other line fails.
Are you sure your constructor should not look like this:
#
Square(const QPoint &left,const QPoint &up,const QPoint &right,const QPoint &down);
#
Same result :s
Ok, just realised, this should not work regardless what you do:
Square::Square(const Square &rhs){
Square(rhs.left(),rhs.up(),rhs.right(),rhs.down()) ;
}
As far as I think to know, you cannot call a constructor within a constructor in C++. This would be JAVA![]()
Bookmarks