Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I have wrote a program that gives the user a choice of whether they want to initialize an array with random generated numbers or keyboard entry.(The user also specifies size). The random generated case worked at one point(I played with the code some more and now it gets stuck in loop). But the Case A for keyboard entry seems to get stuck in an infinite loop. What am I doing wrong here? Thank you in advance for your help.
void fillArray(short original,char choice, short size)
//also have tried cin>>num;original[i]=num;tried a for loop as
case 'b': original[i]=rand();//puts random numbers into array