I'm having a bit of a problem. I'm supposed to create a program that converts base 10 numbers to hexadecimal numbers. My program:
1) Divides a given number by 16
2) Stores the remainder in a variable
3) Finds the character that corresponds to the remainder
4) Appends it to a TCHAR array
5) Divides the integer part by 16
6) Repeats this procedure using the result in step 4, until the result of step 4 is 0.
Now, the problem:
When the program gets to step 4, it replaces all characters (except null-terminating) in the TCHAR array with the result of step 3.
Here's the line I use: wsprintf(output,TEXT("%s%s"),strings[remainder],output)