4 命名空间(Namespaces) 162.2.5 bool型别182.2.6 关键词explicit 182.2.7 新的型别转换操作符(Type Conversion Operators) 192.2.8 常数静态成员(Constant Static Members)的初始化202.2.9 main() 的定义212.3 复杂度和Big-O 表示法213 一般概念(Gen...
基于20个网页-相关网页
2.2.7 新的型别转换操作符(Type Conversion Operators) 19 2.2.8 常数静态成员(Constant Static Members)的初始化20
基于8个网页-相关网页
Users of your type might need to perform multiple casts to invoke the conversion operators, a practice that leads to unmaintainable code.
用户可能须要对类型进行多样化的强制转换操作,这样的实际操作可能产生不维护的代码。
However, you can define implicit conversion operators for a type, which enable you to use the assignment operator with those types.
不过,可为类型定义隐式转换运算符,这样就可以对这些类型使用赋值运算符。
When you define a class or structure, you can define one or more conversion operators to convert that class or structure type to other types.
当您定义类别或结构时,可以定义一或多个将该类别或结构型别转换为其他型别的转换运算子。
应用推荐