Reputation: 2001
I am receiving the mentioned error. My code is as follows:
String^ result;
result = marshal_as<String^>( fd.cFileName );
label.Text = result; // i have a label on form
Any idea. i have a guess that i need to convert String^ to string. if it is, then how can i do that
Upvotes: 0
Views: 1930
Reputation: 612794
The error message is telling you that the symbol to the left of .
must be a class struct or union. If is none of those. Instead it is a handle to a managed type.
Your code should read
label->text = result;
Upvotes: 1