fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. template <typename T1, typename T2>
  5. void f(T1 M1, T2 M2, ...)
  6. {
  7. M1[0] = 33;
  8. }
  9.  
  10. int main() {
  11. int m1[] = {1,2,3};
  12. int m2[] = {4,5,6};
  13. f<int*, int*>(m1,m2);
  14. cout<< m1[0];
  15. return 0;
  16. }
Success #stdin #stdout 0.01s 5564KB
stdin
Standard input is empty
stdout
33