Game of life on the command line in C++