Is this correct? On line 4, should I use "int" instead of "T"?
#include <iostream>
using namespace std;
template <class T>
T Search(int Left, int Right, T X[], T E){
if (Left>Right) return -1;
int Middle=(Left +Right)/2;
if (X[Middle]==E) return Middle;
if (X[Middle]>E) return Search (Left, Middle-1, X, E);
if (X[Middle]<E) return Search (Middle+1, Right, X, E);
}
void main(){
int A[]={0, 1, 9, 11, 31, 72, 100, 101};
cout<<Search(0, 7, A, 72);