Hello everyone:
I am trying to write a while loop to control reading from a file to an array. The array can only hold ten integers. The file may contain any number of integers with one per line. I need a loop test condition that will read from the file until either the end of the file is reached or the array is full. Here is what I have so far:
Code:
cin >> temp;
arrayIndex = 0;
while ( array index < arraySize || )
{
array[arrayIndex] = temp;
arrayIndex++;
cin >> temp;
}
Can someone help me please?