I'm loosing my mind at the moment and below is what I'm trying to do.
char* buffer;
sprintf(buffer, "0x%08x", 5);
*(int *)(0x834AF2AC + 0x1a) = ?buffer?;
Buffer = 0x05000000
I need to set that in memory, if I just set 05 it will set 0x00000005
Question asked better. How can I convert an INT into a format of "0x%08x" So 5 becomes 0x05000000
ANSWERD: The correct answer is *(int *)(0x834AF2AC + 0x1a) = 5<<24;