title: Pass argument to void function
body: <p>How to pass argument line to void? it keep show error the data type should be</p>
  
  <blockquote>
    <p>line [100][260]</p>
  </blockquote>
  
  <p>I try other ways like </p>
  
  <blockquote>
    <p>wchar_t * line[][]</p>
  </blockquote>
  
  <p>still can't </p>
  
  <pre><code>#include "stdafx.h"
  #include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;windows.h&gt;
  
  using namespace std;
  
    void test(DWORD a, wchar_t * line[])
      {
  
          unsigned int i;
  
          for (i = 0; i &lt; a; i++)
          {
              wcout &lt;&lt; line[i];
          }
  
      }
  
      int main()
      {
          FILE *pFile;
          wchar_t *file = L"d:\\a.txt";
          wchar_t line[100][MAX_PATH];
          unsigned int a = 0;
          if (_wfopen_s(&amp;pFile, file, L"r, ccs = UNICODE") == 0)
          {
              while (fgetws(line[a], 100, pFile))
              {
                  a++;
              }
          }
  
          test(a, line);
  
          return 0;
      }
  </code></pre>
  
  <p>Thank you</p>