N***m 发帖数: 4460 | 1 in effective c++, there is an example:
class A{};
class B {
public:
operator A() const;
};
according to the book, the operator A() in B plays the role of
converting B object to A object. How to understand this? | z****e 发帖数: 2024 | 2 read an introductory C++ book. | z****e 发帖数: 2024 | 3 btw, it is also implicit or "automatically", and there is no way to prevent
this implicit conversion from happening. | N***m 发帖数: 4460 | 4 忽然明白了,呵呵
prevent
【在 z****e 的大作中提到】 : btw, it is also implicit or "automatically", and there is no way to prevent : this implicit conversion from happening.
|
|