In this part of you're code you're going to enter an endless loop
Code:
for(count=0;;count++)
{
cin >> array[count];
if(!isdigit(array[count]))
break;
}
You need to have a condition for when to terminate the loop. I forget what it is, but I'll be there's a function somewhat similar to the java arraylen that you can pass the array into to determine the length. Set that as the termination criteria.