Question #1: A two-dimensional structure is stored in C++ as an ________ of _________ or as a ____________ of ____________s.
Question #2: A two-dimensional structure is thought of in terms of ____________ and ____________.
Question #3: A(n) ____________ allows us to create a new data type in C++ using existing data types.
Question #4: How many neighbors do most cells have in the game of life?
Question #5: When is an organism born in a new generation of the game of life?
Code #1:
Write declarations needed to declare table
as a
two-dimensional array whose elements are strings.
Code #2:
Write a type definition to declare Row
as a
vector
of bool
s.
Code #3:
Write a declaration to declare grid
as a vector
of
Row
s.
Code #4:
Write a declaration to access the first row and second column of
grid
. (Assume that the grid is large enough for these
indices to work.)
Code #5:
Write expressions that evaluate to the west and east neighbors of
grid[r][c]
.