Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


C++ Help with the Game of Life (John Conway) Assignment

I really need help on finishing this assignment. I really do not know how to finish it. I do know I need to the use the rules of the "Game of Life" and compare each character in the array.

[b]Here is the assignment: [/b][link=][/link]

The code asks the user to input a filename (ie life01.txt)

[b]life01.txt: [/b][link=][/link]

[b]The program is uploaded to: [/b][link=][/link]

Also I use [b]DEV-C++[/b]
[b]what do I do?[/b]

[code]//Game of Life


using namespace std;

void GetFile(); //Get filename
char MakeArray(); //Make 2d array
char ChgArray(); //change the array
char GameBoard(); //Game Board

//Global Variables
const int ROW1 =12;
const int COL1 =30;
ifstream myfile;
string filename;
char live = 'x'; //life cells
char dead = '.'; //dead cells
char name [ROW1][COL1]; //12by30 2d array
char name2 [12][30]; //another 12by30 2d array
//end of Global variables

//Main Function
int main()
int q; //stops terminal window from quitting after programs ends

//call the functions

//Stop the Program from quitting
cin >> q; //enter any letter to end the program

return 0;

//GetFile Function
void GetFile()
cout<<"Enter the filename:

//MakeArray Function
char MakeArray()
{ (filename.c_str());
for (int r=0; r<12; r++)
for (int c=0; c<30; c++)
//cout << name[r][c];
//cout << endl;

//ChgArray Function
char ChgArray()
//char name2 [12][30];
for (int r=0; r<12; r++)
for (int c=0; c<30; c++)

/*/char GameBaord()
//do something
Sign In or Register to comment.