title: Pass an array of wchar by reference
body: <p>I want to make a function to allocate memory to an array. Suppose I have this:</p>
  
  <pre><code>PWSTR theStrings[] = { L"one", L"two", L"three" };
  
  void foo(PWSTR a, int b) {
      a=new PWSTR[b];
      for(int i=0;i&lt;b;i++) a[i]=L"hello";
      return;
  }
  
  int main() {
      foo(theStrings,4);
  }
  </code></pre>
  
  <p>My question is, how do you make the function foo and the calling of that function so that after foo is called, theStrings will contain four "hello"</p>
  
  <p>Thanks :)
  Reinardus</p>