int max=50;
int firstVal=42;
int secondVal=667; // phew that was close
int mid=max/2;
int* arIntegers=new int[max];
for(int i=0;i<max;i++){
arIntegers[i]= i<mid?firstVal:secondVal;
}
// use your array then when done with it
delete arIntegers; // i'm not quite sure, it's been a while since I last used manual memory management..