a program for the Game of LIFE!

hello guys! a newbie hir! can i ask for your help.

A program for the “Game of Life”. Create a 20 x 20 array. Randomly assign a 0 or 1 to the array. A 0 means that the cell is dead, a 1 means that the cell is alive. Display them using asterisks (1) and blanks (0). The neighbors of the cell is defined as the cells surrounding that cell; refer to the diagram below; the cells with n are the neighbors of the cell *.

please help me guys. I don't know how to use an array, and how to start this king of program. our professor didn't taught this one.

thanks!
http://www.cplusplus.com/doc/tutorial/arrays.html
A very succinct, easy to read tutorial.

You will also want to write a function to print the array.

Hope this helps.
what function can i use to have a random start?.. thanks!
Topic archived. No new replies allowed.