52.模板的重载

 1 #include <iostream>
 2 using namespace std;
 3 
 4 template<class T>
 5 void go(T t1)
 6 {
 7     cout << "ttttt" << endl;
 8 }
 9 
10 template<class T>
11 void go(T *t1)
12 {
13     cout << "******" << endl;
14 }
15 
16 void main()
17 {
18     int *p = new int[2]{ 1,2 };
19     go(p[0]);
20     go(p);
21     go(&p);
22     cin.get();
23 }
原文地址:https://www.cnblogs.com/xiaochi/p/8552792.html