Well...it's slightly complex.
#include<iostream>
using namespace std;
int main(){
int iCount=0;
int array[iCount], iInput,i;
cout<<"HOW MANY NUMBERS:" ;
cin >> iInput;
for(i=0; i<iinput;++i){>
cin>> array[iCount];
iCount++;
}
return 0;
}
Look at your definition of
array
- it's a array of integers, but the number of integers you can store in it is controlled by iCount - which at the time you create the array is zero (because the line above says so).
So when you get to the point of storing a value in the array:
cin>> array[iCount];
there isn't really anywhere to store it, so it will overwrite the "next" variable on the stack - which happens to be iInput.
Give the array a size, and it should start to work.