- 0
String += appending ASCII value instead of char
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
New Microsoft MSBuild editor is an easier and more helpful experimental tool for developers
By John Callaham,
- microsoft
- microsoft msbuild
- (and 2 more)
- 2 replies
- 2 views
-
Save 91% on Microsoft Visual Studio Professional 2022 for Windows
By News Staff,
- neowin deals
- visual studio
- (and 1 more)
- 0 replies
- 2 views
-
Microsoft's second preview update for Visual Studio 17.10 adds GitHub Copilot features
By John Callaham,
- microsoft
- visual studio
- (and 3 more)
- 1 reply
- 2 views
-
Save 90% on Microsoft Visual Studio Professional 2022 for Windows
By News Staff,
- microsoft
- visual studio 2022
- (and 2 more)
- 0 replies
- 2 views
-
Microsoft reminds us that Visual Studio 2013 support ends on April 9, 2024
By Omer Dursun,
- visual studio
- visual studio 2022
- (and 5 more)
- 0 replies
- 5 views
-
Question
Lord Method Man
I've been experimenting with visual C++ having worked in Java for a while. Right now I'm working with a little String manipulation.
I have a Windows Form with a textBox that displays the value of a String. I'm trying to append a char to the String. The problem I'm having is the ASCII value of the String is appended instead of the char itself. So far I haven't been able to find a solution through the resources I've read. Here is an example:
String^ mystring;
char y = 'd';
mystring = "Test";
mystring += y;
textBox->Text = mystring;
The output is "Test100" instead of "Testd" (100 being the ASCII value of d). What should I be doing differently?
Link to comment
Share on other sites
10 answers to this question
Recommended Posts