title: Managed class with a non-managed member
body: <p>I'm using this class:</p>
  
  <pre><code>public ref class x: public System::Windows::Forms::Form
  { 
       private: gcroot&lt;std::string&gt; name;
  }
  </code></pre>
  
  <p>and i am getting the following error:</p>
  
  <pre><code>IntelliSense: a member of a managed class cannot be of a non-managed class type
  </code></pre>
  
  <p>I know i can use <code>char*</code>, but if I use lots of <code>char*</code> i will have to manually do the <code>delete[]</code> or some heap corruption issues will rise
   <br> <br>
  I've been stuck on this for two days now
  <br> <br>
  note: I have to use c++ and have to use UI in c++</p>