Problem with comparing the results from a two-dimensional array!
<p>I'm developing a slot machine game. The player insert amount of money and makes a bet to play.  And the goal of the game is to obtain as many rows, columns, and diagonals as possible of the same symbol. In the above example, obtained a profit when the upper and lower line have equal symbols, partly 2x lines. Depending on the number of rows with the same symbol the user gets paid as the profit system follows:</p>

<ul>
<li>A series provides 2 * bet</li>
<li>Two lines giving 3 * bet</li>
<li>Three rows giving 4 * bet</li>
<li>Four rows gives 5 * bet</li>
<li>Five lines gives 7 * bet</li>
<li>Fully playing field gives 10 * bet</li>
</ul>

<p>I dont know how to solve this problem with the paying? What code can I use? Should I use a for-loop? I'm new with c++ so I'm having trouble with this. I' been spending a lot of hours on this game and I just can't solve it. Please help me! 
Here's a small part of my code for now: I just want to compare the results. </p>

<pre><code> srand(time(0)); 
 char game[3][3] = {{'O','X','A'}, {'X','A','X'}, {'A','O','O'}}; 

 for (int i = 0; i &lt; 3; ++i) 
 { 
 int r = rand() % 3; 
 cout &lt;&lt; " " &lt;&lt;game[r][0] &lt;&lt; " | " &lt;&lt; game[r][1] &lt;&lt; " | " &lt;&lt; game[r][2] &lt;&lt; "\n"; 
 cout &lt;&lt; "___|___|___\n"; 
 } 


 //......compare the result of the random symbols. ????
</code></pre>
