title: Passing a ref or pointer to a managed type as an argument in C++.net
body: <p>I'm really baffled by this - I know how to do this in VB, unmanaged C++ and C# but for some reason I can't accept a ref variable of a managed type in C++. I'm sure there's a simple answer, really - but here's the C# equivalent:</p>
  
  <pre><code>myClass.myFunction(ref variableChangedByfunction);
  </code></pre>
  
  <p>I've tried C++ pointers - no dice. I've tried ref keywords. No dice. I tried the <code>[out]</code> keyword. Didn't work.</p>
  
  <p>I can't find any documentation that clearly explains my problem, either.</p>