title: undeclared identifier when adding additional functions after my main in C++?
body: <pre><code>#include "stdafx.h"
  #include &lt;iomanip&gt;
  #include &lt;ostream&gt;
  #include &lt;fstream&gt;
  using namespace std;
  
  void FillArray(int x[ ], const int Size);
  void PrintArray(int x[ ], const int Size);
  
  int main() 
  {
      const int SizeArray = 10;
      int A[SizeArray] = {0};
      FillArray (A, SizeArray);
      PrintAray (A, SizeArray);
  
      return 0;
  }
  void FillArray (int x[ ], const int Size)
  {
      for( int i = 0; i &lt; Size; i++);
      {
          cout &lt;&lt; endl &lt;&lt; "enter an integer"; //cout undeclared here
          cin &gt;&gt; x[i]; //cin and i undeclared here
      }
  </code></pre>
  
  <p>The "cout", "cin", and "i" all get the error "<code>error C2065: 'cin' : undeclared identifier</code>". I have no idea how to fix them. I have to have three functions: Main, fill array, and print array. Help is appreciated.</p>