Okay I need help getting started.
Here is the assignment:
Conway's Game of Life
For this assignment your are to write a program, that plays Conway's game of Life. See the Wikipedia definition, if
you have never played the game: http://en.wikipedia.org/wiki/Conway's_Game_of_Life.
Here is how our implementation will work:
(1) The program will ask the user to enter a filename from the console. (Just like the last assignment).
(2) The initial configuration will be read in from a file, which will be a 12 by 30 two-dimensional array of characters. The game board will be surrounded by all O's.
(3) The game will be played on 10 by 28 two-dimensional array. (Can you guess why?). A period ('.') will represent a dead cell and an 'X' will represent a live cell.
You will be severely penalized if your program does not have at least three functions.
Here is my current code:
//Game Of Life Assignment
//Dylan Metz
#include <iostream>
#include <string>
#include <fstream>
#include <cstring>
using namespace std;
int main()
{
const int ROWS=12;
const int COLS=30;
char file[ROWS][COLS];
ifstream myfile;
string filename;
cout<<"Enter the filename: \n";
cin>>filename;
myfile.open (filename.c_str());
myfile>>file;
cout<<file;
return 0;
}
I am getting compiler errors