The implicit conversion operator is defined, which converts a Point type to int.
隐式转换操作符将Point类型转换为int。
A conversion operator provides a way for you to define how an object can be converted automatically to a different type.
当类较多且经常需要进行类型之间的转换时,定义类型转换操作符还是很方便的。
For a type conversion operator, either the operand or the return type must be of the data type of the class or structure.
对于类型转换运算符,操作数或返回类型必须是类或结构的数据类型。
For a type conversion operator, either the operand or the return type must be of the data type of the class or structure.
对于类型转换运算符,操作数或返回类型必须是类或结构的数据类型。
应用推荐