I have a class which I try to initialize but get the error "No matching constructor for initialization of 'TextureCoordinates'";
Class which I'm trying to initialize:
class TextureCoordinates
{
public:
TextureCoordinates(){};
TextureCoordinates(Point2D& origin, Dimensions2D& dim);
Point2D getOrigin() const {return origin;};
Dimensions2D getDim() const {return dim;};
private:
Point2D origin;
Dimensions2D dim;
};
Line with compiler error:
TextureCoordinates result(point, Dimensions2D(width, height));
Definition of constructor:
TextureCoordinates::TextureCoordinates(Point2D& origin, Dimensions2D& dim):
origin(origin), dim(dim) {}
Any ideas what I'm doing wrong?