Ditai C++ Study Notes-Lesson 42-Type Conversion Function (Part 2)

Type conversion function
(1) Type conversion function is used to convert class objects into other types
(2) Has the same status as conversion constructor
(3) Enables the compiler to convert objects into other types
(4) The compiler can hide Type conversion function
(5) Implicit type conversion function call cannot be suppressed
(6) Type conversion function may conflict with conversion constructor
(7) Type conversion function is replaced by public members of Type toType() in the project

Guess you like

Origin blog.csdn.net/cj532419842/article/details/115192444