[单选题]

已知类Time的定义如下:

其中横线处应为下标访问运算符[]的重载函数的函数头,横线处应填入的代码是(  )。

A.int&operator[](Time&t,intindex)

B.int&operator[](intindex)

C.friendint&operator[](Time&t,intindex)

D.friendint&operator[](intindex)

参考答案与解析:

相关试题

已知类Time的定义如下:<br /><img border="0" style="width: 533px; height: 391px;"