This question already has an answer here:
- Operator overloading 6 answers
I actually cannot understand 3rd,4th line in the following code in C++ :
struct POINT {
int x,y;
POINT(int x = 0, int y = 0) : x(x), y(y) {}
bool operator ==(POINT& a) {return a.x==x && a.y==y;}
};
Other examples/explanations are also welcome apart from this code snippet :)
Aucun commentaire:
Enregistrer un commentaire