Click here to Skip to main content
15,889,315 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to append the integer num at the end of CString using Append(), so how to do this....
Posted
Comments
chandanadhikari 5-Dec-14 2:13am    
could you please show some code that you tried. I guess you already tried converting the number to string and then appending.

Just use the CString AppendFormat[^] member function (the link contains an example).
 
Share this answer
 
Try this:
C++
CString yourString;
CString strNum;
strNum.Format("%d", 5);
yourString.Append(strNum);


If this helps please take time to accept the solution. Thank you.

Also, next time look around for examples instead of asking first. As a developer, you're expected to find solutions for your self, not have them delivered.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900