- 0
String += appending ASCII value instead of char
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
Get Microsoft Visual Studio Pro for 94% off right now
By News Staff,
- neowin deals
- visual studio 2022
- (and 4 more)
- 0 replies
- 0 views
-
Microsoft Visual Studio Professional 2022 for Windows drops to lowest price
By News Staff,
- neowin deals
- microsoft
- (and 4 more)
- 12 replies
- 0 views
-
ICYMI: Microsoft Visual Studio 2022 v17.13 Preview 1 is available
By zikalify,
- microsoft
- visual studio
- (and 5 more)
- 0 replies
- 2 views
-
Microsoft will soon update Visual Studio via Windows Update
By TarasBuria,
- visual studio
- microsoft
- (and 1 more)
- 9 replies
- 4 views
-
Microsoft wants everyone to code faster as GitHub Copilot in VS Code now generally available
By hellowalkman,
- microsoft
- visual studio
- (and 14 more)
- 1 reply
- 0 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
https://www.neowin.net/forum/topic/1109455-string-appending-ascii-value-instead-of-char/Share on other sites
10 answers to this question
Recommended Posts