Hi,
#include "stdafx.h"
#include<iostream.h>
template<class T>
class Sample
{
public:
Sample();
static int i;
};
template<class T>
int Sample<T>::i = 0;
template<class T>
Sample<T>::Sample()
{
i++;
cout<<i;
}
void main()
{
Sample<int>s1;
Sample<float>s2;
Sample<char>s3;
}
output: 111
what is the reason i am getting out put is 111?