C++ implementation of Conway game of life