多做题,通过考试没问题!

C++语言程序设计

睦霖题库>大学试题(计算机科学)>C++语言程序设计

假设ClassX是类类型标识符,Type为类型标识符,可以是基本类型或类类型,Type_Value为Type类型的表达式,那么,类型转换函数的形式为()

  • A、ClassX::operator Type(Type t){… return Type_Value;}
  • B、friendClassX::operator Type(){… return Type_Value;}
  • C、Type ClassX::operator Type(){…return Type_Value;}
  • D、ClassX::operator Type(){… return Type_Value;}
正确答案:D
答案解析:
进入题库查看解析

微信扫一扫手机做题