[ Completed Project, Thanks for your help ]

2. Seems to me like you have out-of-bounds memory accesses and you check them after the fact in livingcell and deadcell. Also, the upper bound check in those functions is incorrect.

What would be a lot easier would be to modify boolMatrix.get():
Code:
```bool boolMatrix::get(int row, int col)
{
if(row < 0 || row >= rows || col < 0 || col >= cols) {
return false;
}
return matrix[row][col];
}```
The other thing you have wrong is that you're counting the current cell.

The distinction between deadcell and livingcell is not useful. The functions are too similar.

Also, the loops in those functions are misplaced. Way too complicated for something so simple, since you know they'll never change. Unroll them. Also, you can take advantage of the implicit conversion of bool to int.
Code:
```int truecount =
generation.get(row-1, col-1) + generation.get(row-1, col  ) + generation.get(row-1, col+1)
generation.get(row-1, col  ) +              0               + generation.get(row  , col+1)
generation.get(row-1, col+1) + generation.get(row+1, col  ) + generation.get(row+1, col+1)```
Then you do:
Code:
```switch(truecount)
{
case 2: newGeneration.set(row, col, generation.get(row, col));
case 3: newGeneration.set(row, col, true);
default: newGeneration.set(row, col, false);
}```
This is possible because of a shorter reformulation of the rules:
1) If a cell has two living neighbors, it stays the way it is.
2) If a cell has three living neighbors, it will be alive, whether it was now or not.
3) Otherwise, it will be dead, whether it was now or not.

3. THANK YOU!! Your way was much more simple to follow and check for errors. The boundries were a little messed up because I just coppied and pasted the contents of one for statement 3 times in each function and forgot to change what all the boundries were reading to fit each for statement. Also, I wasn't even thinking about the current cell being counted which is probably why I wasn't able to get the correct answer no matter how many different ways i wrote this section of code. I've re-written it four times now and yours is by far the best way.

4. for your reference, there was a very similar problem on the CEMC contest (a Canadian CS contest for high school students, which I participated in)
http://www.cemc.uwaterloo.ca/ccc/2006/senior.pdf

scroll down to S5. The name is Origin of Life, your teacher probably changed it to avoid googling. The problem is much harder, though, because it wants the students to work backwards, from a current generation, generating a tree, and also it's a lot more parameterized. That was the super hard question of the year =).

5. Actually that game was changed from the original, the original thing is called Conway’s Game of Life which is pretty much the exact program my teacher is having us write. They are almost exactly the same with an exception of the Origin of Life game having to find the garden of eden generation and what you said about having to work backwards to figure out the Origin of Life. Thank you for that link though, it will be an interesting thing to check out.

6. > [ Completed Project, Thanks for your help ]
Please don't do this - you've basically trashed the thread so no-one else can possibly learn from (or even contribute to) the discussion.