As far as I remember, in Conway’s "Game of Life" each cell can only be "alive" or "dead".
https://www.youtube.com/watch?v=R9Plq-D1gEk
Means that you need exactly
one bit of storage for each cell, right?
Hence you could use one
64-bit word, e.g.
unit64_t from
<stdint.h>, to store a grid of 8×8 = 64 cells.
(an
int, which is usually 32-Bit in size, won't be sufficient for 8×8 cells)
Of course,
you need to decide how to arrange the 64 cells (bits) within the
64-Bit word.
Order could be "row-major" or "column-major":
https://en.wikipedia.org/wiki/Row-_and_column-major_order
If you want a larger grid than 8×8, you need multiple
64-Bit words, i.e. an array of
unit64_t, each of which represents a 8×8 sub-grid. Again,
you need to decide how to arrange them.
Once you have decided how to arrange the individual cells within a single
64-Bit word
and how to arrange the 8x8 sub-grids within the array of
64-Bit words, it should be relatively straight-forward to write a function that gets or sets the "bit" for a specific cell, by its
x and
y index (position) in the "global" (overall) grid.
This function would
first have to find the right 64-Bit word within the array of 64-Bit words, and
then it would have to get/set the right bit in that 64-Bit word, by using some bit-shift + bitwise "and"/"or" operations.
Given such a function, implementing the "Game of Life" update algorithm will then be possible
without having to bother about how the data is actually stored internally.
Maybe you want to draw a little picture (sketch) first, in order to illustrate the desired arrangement.