Your arrays aren't decalred, all you're doing is overwriting your previous entry in the section where you prompt the user for their input.
It would be helpful to know what error you are getting when you try to compile your project. Off the top of my head you didn't declare "cstdlib" so the "system(...)" function at the end of your code remains undefined. Not that you should be using "system(...)" but it gets old telling everyone that comes through here why.
EDIT: You're trying to address "height" as an array in your for loop toward the end (please use code brackets), it is not declared as such. This would be another reason your code would not compile.
EDIT2: You did not declare "fstream.h" but you are trying to use and "ofstream" object. Yet another reason this would not compile. Also, unless you are denied write permissions to the directory you are working in which would cause so many other issues, there is really no reason that an ofstream would fail.
The reason your code keeps breaking is because of this:
1 2 3 4 5
int userNum[100];
.
.
.
cin >> height[userNum++];
Not only is this not valid syntax, it doesn't make any sense. First of all, userNum is an array... you can't increment the identifier like that... second, height is an array of 5 places, not 100... so this goes out of bounds of the array.