title: Calling getter in windows form from cpp class c++ returns nothing
body: <p>I have a cpp class and a windows form. In cpp class I have declared getters(<code>return char</code>) and setters. The thing is that when I call the getters in form they seem to return nothing. I test the cpp in console project and it works fine. Here is a snippet of my code in Form.h:</p>
  
  <pre><code>vector&lt;NewProduct&gt; products = getPhotosFromDB();
  
  char* photoChar = products[0].getName();
  String^ result;
  result = marshal_as&lt;String^&gt;( photoChar );
  label2-&gt;Text = String::Format(L"name= {0} ",  result);
  </code></pre>
  
  <p>** The connection works fine and the size of the vector is the right one. But When i run the project I got <code>"name=" (blank )</code>
  or sometimes <code>"name=[]" (a square).</code></p>