單項(xiàng)選擇題

假設(shè)ClassX是類類型標(biāo)識(shí)符,Type為類型標(biāo)識(shí)符,可以是基本類型或類類型,Type_Value為Type類型的表達(dá)式,那么,類型轉(zhuǎn)換函數(shù)的形式為()

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;}

微信掃碼免費(fèi)搜題