include iostream using namespace std template class class public data

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "iostream"
using namespace std;
template <class T>
class z
{
public:
T data;
public:
template<class T> void f1(T q)
{
cout << q << endl;
};
template<class korova> void f2(korova q)
{
cout << q << endl;
};
template<class z> float f3(z q)
{
cout << q << endl;
return 1;
};
};
int _tmain(int argc, _TCHAR* argv[])
{
z<int> hi;
hi.f1(23);
hi.f2(43);
hi.f3(44444);
return 0;
}