concatenation
C / C++ / MFC
3
Posts
3
Posters
0
Views
1
Watching
-
How to concatenate a string and an int
-
How to concatenate a string and an int
There are many ways. It depends of type of your string. For null-terminated const char * you can use this one: char res[128]; const char *str = "Result is: "; int num = 10; sprintf(res, "%s%d", str, num); --- Realtime 3D screensavers
-
How to concatenate a string and an int