need to compare the ints in the array, not the indexes.
Should be:
int minIndex(int v[], int first, int last){
if(first==last){return first;}
int tempA = min(v,first,(first+last)/2);
int tempB = min(v,(first+last)/2,last);
if(v[tempA]<v[tempB]) return tempA;
else return tempB;