title: C++ file input, stream, and compile
body: <p>So the problem is that I'm getting error C3867 when I'm attempting to close the file stream (at least that's what I hope I'm doing). The intent is to make a program that uses an input file to read in the values into an array and from there determine what the highest and lowest numbers of the array are. The arraySize can be less or more than 10 data items, and we must check the file for open errors before reading data from the file and to close the file after finished reading the elements into the array. This I can do later but it's an instruction anyway. </p>
  
  <pre><code>#include &lt;stdafx.h&gt;
  #include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;string&gt;
  using namespace std;
  
  int main(){
      const int arraySize = 10;
      float numbers[arraySize];
      int count = 0;
      string fileName;
      float high, low;
  
      fstream inputFile(fileName, ios::in);
  
      cout &lt;&lt; "What is the filename you wish to use? ";
      cin &gt;&gt; fileName;
  
      inputFile.open(fileName);
      while (count &lt; arraySize &amp;&amp; inputFile &gt;&gt; numbers[count])
          count++;
      inputFile.close;
  
      high = numbers[0];
      low = numbers[0];
  
      for (int i = 0; i &lt; arraySize; i++){
          if (numbers[i] &gt; high)
              high = numbers[i];
          if (numbers[i] &lt; low)
              low = numbers[i];
      }
  
      cout &lt;&lt; "The highest number in the file is: " &lt;&lt; high;
      cout &lt;&lt; "The lowest number in the file is: " &lt;&lt; low;
  
      return 0;
  }
  </code></pre>
  
  <p>Am I missing anything?</p>