CH. 5 Loops and Files C++
continue statement
causes a loop to stop its current iteration and begin the next one
break statement
causes the loop to terminate early
fstream
file stream
read position
marks the location of the next byte that will be read from the file
postfix mode
operator placed after variable
prefix mode
operator placed before variable
accumulator
variable used to keep the running total
nested loop
a loop inside another loop
count-controlled loop
a loop that repeats a specific number of times
sentinel
a special value that marks the end of a list of values
user-controlled loop
allows user to control the number of iterations
loop
control structure that causes a statement or group of statements to repeat
loop control variable
controls the number of times a loop iterates
decrement
decrease a value
posttest loop (Ex: do-while loop)
does not test its expression until it has completed an iteration
an iteration
each repetition of a loop
conditional loop
executes as long as a particular condition exists
increment
increase a value
ifstream
input file stream
++ and --
operators that add or subtract 1 from their operands
ofstream
output file stream
file buffer
small 'holding section' of memory that file bound data is first written to
running total
sum of numbers that accumulates with each iteration of a loop
priming read
the read operation that takes place just before the loop
The 3 looping control structures of c++
the while loop, do-while loop, and the for loop
infinite loop
used only in rare cases and continues to repeat until the program is interrupted
counter
variable that is regularly incremented or decremented each time a loop iterates