Sorry for a probably stupid question. I'm pretty new to this.
Anyway I'm writing a simple program to combine multiple files into one large file (used in certain Wii games). I've got most of it done, but I'm having trouble trying to convert a regular character into hex to be written to the file.
One of the arguments I ask for is the number of files to be combined. So for three files the user would type "3". However, it's stored as a character, so when I try to write it itgets written as 0x33 instead of 0x03 as I need it. I've tried typecasting it as an integer but that closest I've gotten it is 0x30. Technically the total number is supposed to be 2 bytes (0x0003), though I doubt the first will ever need to be used.
Unfortunately I don't really have any relevant code to post, but any help would be appreciated (I'm sure it's something simple).