<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: 6.5 &#8212; Multidimensional Arrays</title>
	<atom:link href="http://www.learncpp.com/cpp-tutorial/65-multidimensional-arrays/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.learncpp.com/cpp-tutorial/65-multidimensional-arrays/</link>
	<description></description>
	<lastBuildDate>Wed, 08 Sep 2010 10:51:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: John</title>
		<link>http://www.learncpp.com/cpp-tutorial/65-multidimensional-arrays/comment-page-1/#comment-89623</link>
		<dc:creator>John</dc:creator>
		<pubDate>Wed, 04 Aug 2010 17:15:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/65-multidimensional-arrays/#comment-89623</guid>
		<description>I will give two kinds of methods (one is similar to the author&#039;s, but a bit shorter)
&lt;pre&gt;
#include &lt;iostream&gt;
#include &lt;iomanip&gt;
using namespace std;
// 
// int main()
// {
// 	int row = 10;
// 	int column = 10;
// 	int table_array[row][column];
// 	
// 	for (int i = 1; i &lt; row; i++)
// 	{
// 		for (int j = 1; j &lt; column; j++)
// 		{
// 			table_array[i][j] = i*j;
// 			cout &lt;&lt; setw(5) &lt;&lt; table_array[i][j];
// 		}
// 		cout &lt;&lt; endl;
// 	}
// 	return 0;
// 
// 
// }

// int main()
// {
// 	int row = 13;
// 	int column = 13;
// 	int table_array[row][column];
// 	
// 	for (int i = 1; i &lt; row; i++)
// 	{
// 		int temp = 0;
// 		for (int j = 1; j &lt; column; j++)
// 		{
// 			
// 			temp += i;
// 			table_array[i][j] = temp;
// 			cout &lt;&lt; setw(4) &lt;&lt; table_array[i][j];
// 		}
// 		cout &lt;&lt; endl;
// 	}
// 	return 0;
// }
&lt;/pre&gt;

The first method just takes the cout into the loop as well.
The second is just the stupid-way to do this problem, using additional instead.</description>
		<content:encoded><![CDATA[<p>I will give two kinds of methods (one is similar to the author&#8217;s, but a bit shorter)</p>
<pre>
#include &lt;iostream&gt;
#include &lt;iomanip&gt;
using namespace std;
//
// int main()
// {
// 	int row = 10;
// 	int column = 10;
// 	int table_array[row][column];
//
// 	for (int i = 1; i &lt; row; i++)
// 	{
// 		for (int j = 1; j &lt; column; j++)
// 		{
// 			table_array[i][j] = i*j;
// 			cout &lt;&lt; setw(5) &lt;&lt; table_array[i][j];
// 		}
// 		cout &lt;&lt; endl;
// 	}
// 	return 0;
//
//
// }

// int main()
// {
// 	int row = 13;
// 	int column = 13;
// 	int table_array[row][column];
//
// 	for (int i = 1; i &lt; row; i++)
// 	{
// 		int temp = 0;
// 		for (int j = 1; j &lt; column; j++)
// 		{
//
// 			temp += i;
// 			table_array[i][j] = temp;
// 			cout &lt;&lt; setw(4) &lt;&lt; table_array[i][j];
// 		}
// 		cout &lt;&lt; endl;
// 	}
// 	return 0;
// }
</pre>
<p>The first method just takes the cout into the loop as well.<br />
The second is just the stupid-way to do this problem, using additional instead.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: akila</title>
		<link>http://www.learncpp.com/cpp-tutorial/65-multidimensional-arrays/comment-page-1/#comment-82486</link>
		<dc:creator>akila</dc:creator>
		<pubDate>Thu, 08 Apr 2010 07:04:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/65-multidimensional-arrays/#comment-82486</guid>
		<description>in multidimensional array ,
one column contain a integer,
another column contain a string,
how we declare an array to accept  a value</description>
		<content:encoded><![CDATA[<p>in multidimensional array ,<br />
one column contain a integer,<br />
another column contain a string,<br />
how we declare an array to accept  a value</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cheesefriend</title>
		<link>http://www.learncpp.com/cpp-tutorial/65-multidimensional-arrays/comment-page-1/#comment-75362</link>
		<dc:creator>Cheesefriend</dc:creator>
		<pubDate>Sat, 02 Jan 2010 21:24:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/65-multidimensional-arrays/#comment-75362</guid>
		<description>&lt;pre&gt;
using a 2 dimensional array that is printed to the screen
is properly the eaisest way to make a 2d game map you
can move around on for those that is intrested in that.

made a game like that in matlab:)
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<pre>
using a 2 dimensional array that is printed to the screen
is properly the eaisest way to make a 2d game map you
can move around on for those that is intrested in that.

made a game like that in matlab:)
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fluke</title>
		<link>http://www.learncpp.com/cpp-tutorial/65-multidimensional-arrays/comment-page-1/#comment-73544</link>
		<dc:creator>Fluke</dc:creator>
		<pubDate>Thu, 03 Dec 2009 09:53:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/65-multidimensional-arrays/#comment-73544</guid>
		<description>If you trying to shorten the good example code, just remove the array part :)</description>
		<content:encoded><![CDATA[<p>If you trying to shorten the good example code, just remove the array part :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DoEds</title>
		<link>http://www.learncpp.com/cpp-tutorial/65-multidimensional-arrays/comment-page-1/#comment-72907</link>
		<dc:creator>DoEds</dc:creator>
		<pubDate>Tue, 24 Nov 2009 10:56:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/65-multidimensional-arrays/#comment-72907</guid>
		<description>You may also remove the if statement to shorten the code.

&lt;pre&gt;// Calculate a multiplication table more efficiently
    for (int nRow = 0; nRow &lt; nNumRows; nRow++)
    {
        for (int nCol = 0; nCol &lt; nNumCols; nCol++)
        {
            nProduct[nRow][nCol] = nRow * nCol;
            if(nCol != 0 &amp;&amp; nRow != 0)
                cout &lt;&lt; nProduct[nRow][nCol] &lt;&lt; &quot;\t&quot;;
        }
        if(nRow != 0)
        cout &lt;&lt; endl;
    }
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>You may also remove the if statement to shorten the code.</p>
<pre>// Calculate a multiplication table more efficiently
    for (int nRow = 0; nRow &lt; nNumRows; nRow++)
    {
        for (int nCol = 0; nCol &lt; nNumCols; nCol++)
        {
            nProduct[nRow][nCol] = nRow * nCol;
            if(nCol != 0 &amp;&amp; nRow != 0)
                cout &lt;&lt; nProduct[nRow][nCol] &lt;&lt; &quot;\t&quot;;
        }
        if(nRow != 0)
        cout &lt;&lt; endl;
    }
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: rrr</title>
		<link>http://www.learncpp.com/cpp-tutorial/65-multidimensional-arrays/comment-page-1/#comment-70678</link>
		<dc:creator>rrr</dc:creator>
		<pubDate>Tue, 20 Oct 2009 11:39:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/65-multidimensional-arrays/#comment-70678</guid>
		<description>k</description>
		<content:encoded><![CDATA[<p>k</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://www.learncpp.com/cpp-tutorial/65-multidimensional-arrays/comment-page-1/#comment-69901</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Wed, 07 Oct 2009 12:11:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/65-multidimensional-arrays/#comment-69901</guid>
		<description>g++ compiler required double { { } } braces as follows compared to the single in the example

&lt;pre&gt;int nProduct[nNumRows ][nNumCols ] = { {0} };&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>g++ compiler required double { { } } braces as follows compared to the single in the example</p>
<pre>int nProduct[nNumRows ][nNumCols ] = { {0} };</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: detroit</title>
		<link>http://www.learncpp.com/cpp-tutorial/65-multidimensional-arrays/comment-page-1/#comment-68299</link>
		<dc:creator>detroit</dc:creator>
		<pubDate>Mon, 14 Sep 2009 14:22:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/65-multidimensional-arrays/#comment-68299</guid>
		<description>is there any body to create a multiplication table using array in c++?</description>
		<content:encoded><![CDATA[<p>is there any body to create a multiplication table using array in c++?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TBM</title>
		<link>http://www.learncpp.com/cpp-tutorial/65-multidimensional-arrays/comment-page-1/#comment-64026</link>
		<dc:creator>TBM</dc:creator>
		<pubDate>Thu, 09 Jul 2009 22:44:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/65-multidimensional-arrays/#comment-64026</guid>
		<description>Your code wouldn&#039;t compile for me do to nCol falling out of scope in the 2nd if statement. Though this code worked fine for me.

&lt;pre&gt;// Calculate a multiplication table more efficiently
    for (int nRow = 0; nRow &lt; nNumRows; nRow++)
    {
        for (int nCol = 0; nCol &lt; nNumCols; nCol++)
        {
            nProduct[nRow][nCol] = nRow * nCol;
            if(nCol != 0 &amp;&amp; nRow != 0)
                cout &lt;&lt; nProduct[nRow][nCol] &lt;&lt; &quot;\t&quot;;
        }
        if(nRow != 0)
        cout &lt;&lt; endl;
    }
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Your code wouldn&#8217;t compile for me do to nCol falling out of scope in the 2nd if statement. Though this code worked fine for me.</p>
<pre>// Calculate a multiplication table more efficiently
    for (int nRow = 0; nRow &lt; nNumRows; nRow++)
    {
        for (int nCol = 0; nCol &lt; nNumCols; nCol++)
        {
            nProduct[nRow][nCol] = nRow * nCol;
            if(nCol != 0 &amp;&amp; nRow != 0)
                cout &lt;&lt; nProduct[nRow][nCol] &lt;&lt; &quot;\t&quot;;
        }
        if(nRow != 0)
        cout &lt;&lt; endl;
    }
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: FuturePixstar</title>
		<link>http://www.learncpp.com/cpp-tutorial/65-multidimensional-arrays/comment-page-1/#comment-62962</link>
		<dc:creator>FuturePixstar</dc:creator>
		<pubDate>Wed, 24 Jun 2009 00:26:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/65-multidimensional-arrays/#comment-62962</guid>
		<description>i belive it&#039;s 2.8</description>
		<content:encoded><![CDATA[<p>i belive it&#8217;s 2.8</p>
]]></content:encoded>
	</item>
</channel>
</rss>
