'Is there any difference between put parameters in the function template and the function header? [duplicate]

I'm confused about this. Is there any difference between put parameters in the function template and the function header?

template<int index, typename T1, typename T2>
void testing(T1 t1, T2 t2){
    t1 = index + t1 + t2;
    cout << t1 << endl;
}
template<typename T1, typename T2>
void testing2(int index, T1 t1, T2 t2){
    t1 = index + t1 + t2;
    cout << t1 << endl;
}
int main(){
    testing<5>(1,2);
    testing2(5,1,2);
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source