While I was working with the console, I described the search method through cycles and the vector of char characters without any problems.
When I switched to forms, I ran into a problem. I don't understand how to work with the System::String^ data type, which is necessary for working with TextBox and RichTextBox .
I tried to convert to char and see what I’ll get in the end, like this:
System::String^ str; str=TextBox->Text; char ch = str[2]; TextBox->Text=System::Convert::ToString(ch); As a result, my char was converted as an integer value, and not as a character and displays the ASCII code of the character instead of the character itself. After replacing char with System::Char^ everything worked fine.
So the question is, what are these data types, how do they differ from standard string and char and how can they be transferred to a custom processing class?
So far I had only one thought. Create an array of elements of type int , where by loop to load ASCII codes from System::String^ , then transfer this array to the method of a custom class, where to process. But really such difficulties in the elementary task "Prepare for processing a character array entered by the user". In order to enter the number-process-output, it needs to be converted at least 2 times.
Win Form Application C ++ VS2010