You'd use a for loop . . .
/this is trying to store user input into the 51st element
//You can only use myarray...myarray (= 50 doubles).
So for this part your saying each time I ask the user to input a Temperature, I have to put a cin statement for myarray, myarray, myarray etc etc going up one each time until I reach 49? Is there any way to automatically put the user data into the array and tell it to go to the next one without inputing a number into [ ] ?
Look at your code.
>> ;cout << " Enter 1 to input more values, 0 to stop";
in this line i got an error originally without the ; at the beginning, and visual studio c++ told me to enter it for some reason, it has done this a few times I think it is because i had the wrong type of brackets.
It would be more readable as
;cout << " Enter 1 to input more values, 0 to stop";
The missing semicolon errors are misleading, they always point to the following line (where the missing semicolon was detected).
cout << " Enter 1 to input more values, 0 to stop";
Something like this should work:
>> Do you know how to use a for loop? It's basically the same idea here. Loop from index = 0 and while index is less than 50, incrementing index each time. If the user enters 0 to stop, then break out of the loop.
I think I know how to set up a for loop for this array, and to have the user enter 0 to finish. My problems run into entering the value of what the user inputs into my array which is assumed to be no more than 50, and have them choose to enter 0 or 1 to continue and have it restart in the same loop. Then when they do choose to stop the loop it should print out not the value of the myarray[number] , but the number of actual arrays created by the user. Any help greatly appreciated thanks, im on a different computer atm or I would send my updated code.
 Sorry, I read the requirements as "the numbers entered must be less than 50", not "there must be less than 50 numbers entered." Ignore the last part of this post. See Daved's post below. [/edit]
} while(the_number is invalid);