When displaying an array using a loop, nothing works
<p>Here's my code</p>

<pre><code>void printMatrix(string matrix[][NUMBER_OF_SCORES + 1], int NUMBER_OF_STUDENTS)
{
int row, col;
//this code below is to loop it so it displays all the values
/* for (row = 0; row &lt; NUMBER_OF_STUDENTS + 1; col++)
{
   cout &lt;&lt;  matrix[row][col];
   cout &lt;&lt; endl;
}
*/
int looper = 0;
// THIS IS THE FORMAT FOR DISPLAYING ONE LINE MAN

//cout &lt;&lt; matrix[0][0];
//cout &lt;&lt; matrix[0][1];



//this is just some test code to see if it can output certain values right
//  cout &lt;&lt; matrix[0][0];
// cout &lt;&lt; matrix[0][1];
// cout &lt;&lt; matrix[0][2];
// cout &lt;&lt; matrix[0][3];
} 
</code></pre>

<p>I have tried everything. I have tried for loops and I've tried while loops. I don't understand why it won't work. It either displays nothing and immediately crashes, or it just keeps "scrolling" down, like it's repeating infinitely but not displaying any text.
There was a while loop I tried that went like this</p>

<pre><code>int looper;
int looper = NUMBER_OF_STUDENTS;
//in this instance, NUMBER_OF_STUDENTS was equal to 28
while (looper &gt; 0)
{
cout &lt;&lt; matrix[looper][0];
cout &lt;&lt; matrix[looper][1];
looper--; 
//i have tried both looper-- and --looper
}
</code></pre>

<p>I don't understand why it isn't working at all; it's incredibly frustrating. This is the same program I'm working on as <a href="http://stackoverflow.com/questions/15845518/how-do-i-skip-the-first-line-of-an-array-when-reading-from-a-file">How do I skip the first line of an array when reading from a file?</a>
I feel very guilty asking you guys for so much help, but I'm seriously about to snap here.</p>

<p>EDIT: Here's my entire code.</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;iomanip&gt;

using namespace std;

const int NUMBER_OF_STUDENTS = 28;
const int NUMBER_OF_SCORES = 28;

void getData (ifstream&amp; infile, string matrix[][NUMBER_OF_SCORES + 1 ],
                    int NUMBER_OF_STUDENTS) ;

void printMatrix(string matrix[][NUMBER_OF_SCORES + 1], int NUMBER_OF_STUDENTS);



int main()
{
string birdarray [NUMBER_OF_STUDENTS][NUMBER_OF_SCORES +1 ] ;
              // column 0 will hold the student ID.
              // row n has the ID and birdarray for student n.


ifstream inData; //input file stream variable
inData.open("one.txt");

if ( !inData)
{
     cout &lt;&lt; "invalid file name \n";

     return 1;
}

// input the birdarray into two-D array birdarray
getData ( inData , birdarray, NUMBER_OF_STUDENTS );
printMatrix(birdarray, NUMBER_OF_STUDENTS);



// return  the row number of a searchItem in a particular column.
// if not found, return -1
}


void getData (ifstream&amp; infile,string chart[][NUMBER_OF_SCORES + 1 ],
                    int student_count)

{
 int row, col;
 string dummyLine;
 getline(infile, dummyLine);
 for ( row = 0; row &lt; student_count; row++)
    for (col =0; col &lt;  NUMBER_OF_SCORES +1  ; col++)
        infile  &gt;&gt; chart [row] [col] ;


}
void printMatrix(string matrix[][NUMBER_OF_SCORES + 1], int NUMBER_OF_STUDENTS)
{
int row, col;
//this code below is to loop it so it displays all the values
/* for (row = 0; row &lt; NUMBER_OF_STUDENTS + 1; col++)
{
   cout &lt;&lt;  matrix[row][col];
   cout &lt;&lt; endl;
}
*/
int looper = 0;
// THIS IS THE FORMAT FOR DISPLAYING ONE LINE MAN

//cout &lt;&lt; matrix[0][0];
//cout &lt;&lt; matrix[0][1];





//this is just some test code to see if it can output certain values right
//  cout &lt;&lt; matrix[0][0];
// cout &lt;&lt; matrix[0][1];
// cout &lt;&lt; matrix[0][2];
// cout &lt;&lt; matrix[0][3];
}
//prints a labeled listing of students' scores
</code></pre>
