G
Guest
I’m not sure where to post this, so I post it here. It’s more like a VC++.NET
/ Managed Code problem. Probably easy to fix for you guys.
I want to use a String object as a parameter for a function. Here is what it
should look like:
String *a = "Hallo";
this->SomeClass->FormatString(a);
this->label->Text = a;
The FormatString function looks like this:
void FormatString(String *b)
{
b = “Alohaâ€;
}
What comes up in the label is “Hallo†instead of “Alohaâ€. All class
declarations and everything works fine. The code compiles without error or
warning, but I’m not able to pass the String object to “FormatString†in a
way that it can change it. What am I doing wrong?
/ Managed Code problem. Probably easy to fix for you guys.
I want to use a String object as a parameter for a function. Here is what it
should look like:
String *a = "Hallo";
this->SomeClass->FormatString(a);
this->label->Text = a;
The FormatString function looks like this:
void FormatString(String *b)
{
b = “Alohaâ€;
}
What comes up in the label is “Hallo†instead of “Alohaâ€. All class
declarations and everything works fine. The code compiles without error or
warning, but I’m not able to pass the String object to “FormatString†in a
way that it can change it. What am I doing wrong?