The

here
Last edited on
If nextLife gets changed in void checkNeighboors(bool life[][SIZE],bool nextLife[][SIZE]), it's only changed there and not in the Mainfunction. Same in void nextGen(bool life[SIZE][SIZE],bool nextLife[SIZE][SIZE]).

You shoud pass this variables with a Pointer, a reference oder make them global.


Also you have to check if line or row is 0 or SIZE in checkNeighboors before you can check something like if (life[row-1][col-1] == 1) neighbors++;. Without you are checking one field outside the array
Last edited on
Coukd you illustrustae your first point with another example that wouldn't involve Pointers as I have yet to familiarize myself with them?Thanks
I see no code. But is the program drawing as if it were a maze generator? if so try making another container/list/array which ever you are using to keep track of what is alive or dead.


Topic archived. No new replies allowed.