单选题 假设有函数模板定义如下,下列各选项中正确的是( )。 Template <class T> T Max(T a,T b,T c) { if(a<b) {if(b<c) return c; else return b;} else {if(a<c) return c; else return a;} }
【正确答案】 A
【答案解析】[解析] 使用函数模板,要求形参必须为相同类型。