下面不属于同一函数模板的是( )。
A.template<class t1> t1 max(t1 &a,t1 &b) {…}template<class t2> t2 max(t2 &a,t2 &b) {…}
B.template<class t1>t1 max(t1 a,t1 b){…}template<class t2>t2 max(t2 &a,t2 &b){…}
C.template<class t1> t1 max(t1 * a,t1 * b) {…} template<class t2> t2 max(t2 &a,t2 &b) {…}
D.template<class t1>t1 max(t1 a,t1 b){…}template<class t2>t2 max(t2 &a,t2 &b,t2 c){…}
第1题:
第2题:
第3题:
下面属于同一函数模板的是____
A.template<class t1> t1 max(t1 &a,t1 &b) {...} template<class t2> t2 max(t2 &a,t2 &b) {...}
B.template<class t1> t1 max(t1 a,t1 b) {...} template<class t2> t2 max(t2 &a,t2 &b) {...}
C.template<class t1> t1 max(t1 *a,t1 *b) {...} template<class t2> t2 max(t2 &a,t2 &b) {...}
D.template<class t1> t1 max(t1 a,t1 b) {...} template<class t2> t2 max(t
第4题:
第5题:
若同时定义了下列四个选项格式的函数和模板,fun(8,3.1)调用的是()
A.template<class T1,class T2)fun(T1,T2)
B.fun(double,int)
C.fun(double,int)
D.fun(double,char)