- May 13, 2003
- 13,704
- 7
- 81
I'm doing this 'Game of Life' program for CS 2308. I know what I have to do, but I can't get it to work. I'm having issues with writing the second 2d array, and then making the first second one the first one.
I don't know what the hell is going on with this project... I will post the source code if anyone wants to take a gander and tell me what I'm screwing up, or what to research to find the solution (I don't mind researching an answer--just don't know where to look).
I believe the problem is with assigning an int (return from deadOrAlive() ) to a cell in the 2d array.
Conways Game of Life
Project description
Source code:
source code
I've got the output correct now. I just have to figure out why the bottom two lines make it crash after the second iteration... I need these two lines to prevent memory leaks, and to swap up the arrays as to create the 'animation'.
delete [] text;
text = newtext;
I don't know what the hell is going on with this project... I will post the source code if anyone wants to take a gander and tell me what I'm screwing up, or what to research to find the solution (I don't mind researching an answer--just don't know where to look).
I believe the problem is with assigning an int (return from deadOrAlive() ) to a cell in the 2d array.
Conways Game of Life
Project description
Source code:
source code
I've got the output correct now. I just have to figure out why the bottom two lines make it crash after the second iteration... I need these two lines to prevent memory leaks, and to swap up the arrays as to create the 'animation'.
delete [] text;
text = newtext;
