C++ string array from ifstream
<p>I have a program that I need to read in an array of strings from a file. The array must be C type strings (char * or char[]).</p>

<p>Using the following code, I get a bad access error:</p>

<pre><code>for (i = 0; i &lt; MAX_WORDS &amp;&amp; !inputFile.eof(); i++) {
    inputFile &gt;&gt; words[i];
}
</code></pre>

<p>words is declared as:</p>

<pre><code>char *words[MAX_WORDS];
</code></pre>
