- 0
String += appending ASCII value instead of char
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
Microsoft now allows you to tweak Visual Studio to new extremes
By Usama Jawad96,
- microsoft
- visual studio
- (and 5 more)
- 2 replies
- 2 views
-
Visual Studio finally gets long-awaited feature that developers will love
By Usama Jawad96,
- microsoft
- visual studio
- (and 10 more)
- 6 replies
- 2 views
-
Still 93% off: Microsoft Visual Studio Professional 2026 lifetime digital license
By News Staff,
- microsoft
- microsoft visual studio 2026
- (and 5 more)
- 0 replies
- 0 views
-
[Price Dropped] Microsoft Visual Studio Professional 2026 now 93% off
By News Staff,
- microsoft
- visual studio 2026
- (and 4 more)
- 0 replies
- 0 views
-
[Price Drop] This Visual Studio 2026 & Learn to Code Bundle is now 98% off
By News Staff,
- neowin deals
- visual studio 2026
- (and 4 more)
- 0 replies
- 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