Incomplete type, what does this mean?
<p>I am trying to debug my program, and I am reading values from a file called intInputFile. I was looking at my local variables and saw that it says intInputFile = incomplete type. I have tried looking it up, but no clear answers, I don't know what this means. Can anyone please explain because I think this is messing up my program. </p>

<p>Thanks. </p>

<pre><code>intInputFile &gt;&gt; fileInt;
cout &lt;&lt; "check" &lt;&lt;endl;
while(!intInputFile.eof())
{
    intNode* anotherInt;
    anotherInt = new intNode;
   if(intList==NULL)
   {
       intList = anotherInt;
       lastInt = anotherInt;
       lastInt-&gt;nextNode = NULL;
       lastInt-&gt;nextNode = new intNode;
   }
   else
   {
      lastInt = lastInt-&gt;nextNode;
      lastInt-&gt;nextNode = NULL;
      lastInt-&gt;nextNode = new intNode;
   }
   lastInt-&gt;intValue = fileInt;
   intInputFile &gt;&gt; fileInt;
   cout &lt;&lt; "good" &lt;&lt;endl;
}
</code></pre>

<p>After first execution it correctly reads in the first integer from the file , but I noticed the incomplete type when debugging. Also, I included cout &lt;&lt;"good"; to see if it would run to that point and when my program executed, all it did was repeatedly display "good".</p>

<p>Here are the includes:</p>

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

<p>And I defined it as a regular ifstream type:</p>

<pre><code>  int fileInt; //int read from input file
  ifstream intInputFile;
</code></pre>
