i just started a new programming course and feel absolutley overwhelmed compared to my last one, we have to wrtie a program for the game of life.
could somebody point me in the right direction, i am so confused right now...
http://www.comp.mq.edu.au/units/comp125/assignments/ass1/assignment1.html
thanks!
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
const int SIZE = 20;
bool readGrid(string, char [][SIZE]);
void displayGrid(const char [][SIZE]);
// declare more functions if necessary
int main()
{
string fileName; // the name of the grid file
int nGenerations; // nGenerations is the number of generations
char grid[SIZE][SIZE]; // a char array consiting of '*' or '.'
// declare more variables if necessary
cout << "Enter the filename of the grid: " << flush; // don't modify
cin >> fileName; // don't modify
cout << endl; // don't modify
// add processing for reading and displaying the grid
cout << endl << "How many generations in total? " << flush; // don't modify
cin >> nGenerations; // don't modify
// add processing for new grid generations
if (nGenerations == 1) // don't modify
cout << "This is the grid after " << nGenerations << " generation:" << endl << endl; // don't modify
else // don't modify
cout << "This is the grid after " << nGenerations << " generations:" << endl << endl; // don't modify
// display the grid
cout << endl; // don't modify
system("pause"); // don't modify
return 0; // don't modify
}
// implement all declared functions