现在的位置: 首页 > 综合 > 正文

Question 31: A C++ developer wants to handle a static_cast() operation for the class String shown below. Which of the following

2013年02月11日 ⁄ 综合 ⁄ 共 211字 ⁄ 字号 评论关闭

class String {

public:

   //...

   //declaration goes here

};

 

    A. char* operator();

    B. char* operator char*();

    C. String operator char*();

    D. operator char*();

    E. char* operator String();

D

2种会导致隐式类型转换的方法  1 单参数构造函数 2operator+类型名

抱歉!评论已关闭.