How to realize Symmetry Operation in C++
This article introduces how to achieve symmetry operation in C++, the content is very detailed, interested friends can use for reference, I hope it can be helpful to you.
Reason (reason)
If you use member functions, you need two. Unless you use a nonmember function for (say) = =, a = = b and b = = a will be subtly different.
If you use member functions, you need to prepare two. Unless you use a non-member function to implement = =, there is a subtle difference between a distinct b and a bounded rooma.
Example (sample)
Bool operator== (Point a, Point b) {return a.x = = b.x & & a.y = = b.y;} so much about how to implement symmetry operations in C++. I hope the above content can be helpful to you and learn more knowledge. If you think the article is good, you can share it for more people to see.