Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

First year programming yay!

Name: Anonymous 2008-03-01 21:22

Hola /prog/,

I'm attempting to write the code for Conway's Game of Life for my C++ class (out of '.' '*' and '@') Everything compiles fine, yet it doesn't do what I want. I've been pouring over the damn thing, and I thought you guys might be kind enough to help out.

Where i is the row, t is column, M is the array storing the number of live cells. I think the problem is in what I've posted here, or the functions, which I will post in a second. When I run this all it does is output the original grid of cells, even though my functions should have changed them in SOME way.

 for (int i = 1; i <= n; i++)
    {
      for (int t = 1; t <= n; t++)
    {
      M[i][t] = count(A, n, i, t);
    }
    }

  for (int x = 0; x >= steps; x++)
     {
      grow(A, M, n, i, t);
     }
   output_array(A, n);

Name: Gracious OP 2008-03-03 2:31

I got it done, /prog/. I thank you for your words of wisdom, as well as your scorn.

Name: Anonymous 2009-10-12 20:58

[#]
[m][sup]
        [i]e[/i]   [b][i][o][u]S u s s[/u][/o][/i][/b]                 
      [i]h[/i]             [b][i][o][u]m[/u] [/o][/i][/b]              
    [i]t[/i]    [b][o][u]O R N A D[/u][/o][/b]    [b][i][o][u]a[/u][/o][/i][/b]             
       [b][o][u]T[/u][/o][/b]           [b][o][u]O[/u][/o][/b]    [b][i][o][u]n[/u][/o][/i][/b]           
 [i]d[/i]           [b]m y[/b]                     
[i]n[/i]    [b]e[/b]   [i]h[/i]        [o][u][i][b]W[/b][/i][/u][/o]   [i]o[/i]   [i]s[/i]          
[i]A[/i]   [b]h[/b]   [i]t[/i]         [o][u][i][b]A[/b][/i][/u][/o]   [i]f[/i]   [i]a[/i]          
    [b]t[/b]   [i]i[/i]    “    [o][u][i][b]N[/b][/i][/u][/o]       [i]i[/i]          
        [i]w[/i]      [i]![/i] [o][u][i][b]D[/b][/i][/u][/o]    [b][i]B[/i][/b]   [i]d[/i]          
                     [b][i]B[/i][/b]                 
     [spoiler]e[/spoiler]    [b][i]E[/i][/b]             "            
       [spoiler]r[/spoiler]    [b][i]D O C[/i][/b]     [b]I[/b]              
         [spoiler]u[/spoiler]                         
           [spoiler]j n o c[/spoiler]                 
[/sup][/m]
[/#]

Name: Anonymous 2009-10-12 20:59

[m][#]
[m][sup]
        [i]e[/i]   [b][i][o][u]S u s s[/u][/o][/i][/b]                 
      [i]h[/i]             [b][i][o][u]m[/u] [/o][/i][/b]              
    [i]t[/i]    [b][o][u]O R N A D[/u][/o][/b]    [b][i][o][u]a[/u][/o][/i][/b]             
       [b][o][u]T[/u][/o][/b]           [b][o][u]O[/u][/o][/b]    [b][i][o][u]n[/u][/o][/i][/b]           
 [i]d[/i]           [b]m y[/b]                     
[i]n[/i]    [b]e[/b]   [i]h[/i]        [o][u][i][b]W[/b][/i][/u][/o]   [i]o[/i]   [i]s[/i]          
[i]A[/i]   [b]h[/b]   [i]t[/i]         [o][u][i][b]A[/b][/i][/u][/o]   [i]f[/i]   [i]a[/i]          
    [b]t[/b]   [i]i[/i]    “    [o][u][i][b]N[/b][/i][/u][/o]       [i]i[/i]          
        [i]w[/i]      [i]![/i] [o][u][i][b]D[/b][/i][/u][/o]    [b][i]B[/i][/b]   [i]d[/i]          
                     [b][i]B[/i][/b]                 
     [spoiler]e[/spoiler]    [b][i]E[/i][/b]             "            
       [spoiler]r[/spoiler]    [b][i]D O C[/i][/b]     [b]I[/b]              
         [spoiler]u[/spoiler]                         
           [spoiler]j n o c[/spoiler]                 
[/sup][/m]
[/#][/m]

Name: Anonymous 2011-01-31 21:24

<-- check em dubz

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List