The

Dec 10, 2009 at 3:43am
here
Last edited on Dec 11, 2009 at 7:06pm
Dec 10, 2009 at 8:11am
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 Dec 10, 2009 at 10:44am
Dec 10, 2009 at 5:06pm
Coukd you illustrustae your first point with another example that wouldn't involve Pointers as I have yet to familiarize myself with them?Thanks
Dec 11, 2009 at 12:19am
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.