title: C++: Argument error while trying to call a function from a custom header file
body: <p>So, this program is meant to have three parallel arrays that carry the names of ten account holders, their IDs, and their balances. My main file looks like this:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;iomanip&gt;
  #include &lt;string&gt;
  #include &lt;fstream&gt;
  #include "IOFunctions.h" // My header file
  using namespace std;
  
  int main ()
  {   
      const int AR_SIZE = 10;
  
      string nameAr;
      int    idAr;
      float  balanceAr;
  
      // F U N C T I O N -- ReadInData
      ReadInData(nameAr,
                 idAr,
                 balanceAr,
                 AR_SIZE);
  }
  </code></pre>
  
  <p>The error I'm getting looks like this: <a href="http://i.imgur.com/1eHOZ7K.png" rel="nofollow">http://i.imgur.com/1eHOZ7K.png</a></p>
  
  <p>Now, the header file looks like this:</p>
  
  <pre><code>#ifndef IOFUNCTIONS_H_ // This is my own header
  #define IOFUNCTIONS_H_
  
  #include &lt;iomanip&gt;
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;fstream&gt;
  using namespace std;
  
  
  string ReadInData(string    nameArray[],
                    int       idArray[],
                    float     balanceArray[],
                    const int ARRAY_SIZE)
  {
      ifstream inFile;
  
      string inFileName;
      string outFileName;
  
      // INPUT -- Prompts user for input file name
      cout &lt;&lt; left &lt;&lt; setw(40)
           &lt;&lt; "What input file would you like to use? ";
      getline(cin, inFileName);
  
      // Checks that the file name entered is accessible
      while(inFileName != "InFile.txt")
      {
          cout &lt;&lt; setw(40) &lt;&lt; "Please enter a valid file name: ";
          getline(cin, inFileName);
      }
  
      // INPUT -- Prompts user for output file name
      cout &lt;&lt; setw(40)
           &lt;&lt; "What output file would you like to use? ";
      getline(cin, outFileName);
  
      // Checks that the file name entered is accurate to assignment
      while(outFileName != "OFile.txt")
      {
          cout &lt;&lt; setw(40) &lt;&lt; "Please enter a valid file name: ";
          getline(cin, outFileName);
      }
  
      // PROCESSING -- Takes the data from the input file and assigns it
      //               to the names array, ID array, and balance array
  
      // NAME ARRAY
      inFile.open(inFileName.c_str());
      for(int index = 0; index &lt; ARRAY_SIZE; index++)
      {
          inFile &gt;&gt; nameArray[index];
      }
      inFile.close();
  
      // ID ARRAY
      inFile.open(inFileName.c_str());
      for(int index = 0; index &lt; ARRAY_SIZE; index++)
      {
          inFile &gt;&gt; idArray[index];
      }
      inFile.close();
  
      // BALANCE ARRAY
      inFile.open(inFileName.c_str());
      for(int index = 0; index &lt; ARRAY_SIZE; index++)
      {
          inFile &gt;&gt; balanceArray[index];
      }
      inFile.close();
      return outFileName;
  }
  #endif /* IOFUNCTIONS_H_ */
  </code></pre>
  
  <p>All help is greatly appreciated. If I'm missing anything, please let me know.</p>