You have plenty of problems with your code. Any templated class must be given the template arguments when you use it, so any use of Pair in your code must be changed to Pair<double, char *>. Before you can create an array of class objects, there must be a default constructor. And lastly, main returns int, not void.
Also, passing char * as a template argument isn't the wisest thing to do because you'll be working with a reference to the memory, not a copy. Any internal state of an object should usually have its own copies of the data. In this case the C++ string class would be much safer.
Code:
#include <iostream>
#include <string>
using namespace std;
template<class T,class S>
class Pair
{
protected:
T rison;
S sheni;
public:
Pair(): rison(T()), sheni(S()){}
Pair(T mfirst,S msecond);
virtual ~Pair();
T first(){return rison;};
S second(){return sheni;};
};
template<class T,class S>
Pair<T,S>::Pair(T mfirst,S msecond)
{
this->rison=mfirst;
this->sheni=msecond;
cout <<"Pair has been created "<<endl;
}
template<class T,class S>
Pair<T,S>::~Pair()
{
cout <<"Pair has been deleted "<<endl;
}
const int SIZE=5;
int main()
{
double n1;
string n2;
Pair<double, string>* arr;
arr = new Pair<double, string>[SIZE];
for (int i=0;i<SIZE;i++)
{
cout <<"Enter two values "<<endl;
cout <<"----->";
cin >>n1;
cin >>n2;
arr[i] = Pair<double, string>(n1,n2);
}
delete [] arr;
}