Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


Conway's Game of Life filter_list
Author
Message
RE: Conway's Game of Life #8
Code:
//Random "globel" defines

You spelled "global" wrong here lol.

But, about the actual code, and this looks like it was written for C.

Code:
system("cls");
There are better and safer, alternatives to this.

Code:
goto mainmenu;break;
break; is redundant. Some people keep it just in case, and for readability, but I don't see the point in my opinion.

Code:
goto getchar;break;
Same thing here.

For your loops with goto though especially, why do you think goto is better? There's only certain cases where a goto is feasible, and this is not one of them. I don't see much nested here either, which would lead me to another good use of goto. The way it has been used in your code has turned it into spaghetti code though.

As for the dangers of system(), it can be used easily for exploitive purposes. I would suggest reading this link though: http://www.cplusplus.com/forum/articles/11153/
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply





Messages In This Thread
Conway's Game of Life - by Dark_Sunrise - 05-01-2013, 08:07 PM



Users browsing this thread: 3 Guest(s)