mardi 28 janvier 2020

Error C2677: binary '*': no global operator found (C++)

Sorry for asking a similar question that has been asked before, but I wasn't able to understand the answers.

Header file

    float Dot(const Point& other) const;

CPP

Point Point::operator*(float operand) const
{
    return Point(mX * operand, mY * operand);
}

and I am getting Error C2677: binary '*': no global operator found

what is the problem??

Aucun commentaire:

Enregistrer un commentaire