the title of your post is exactly the opposite of what you actually want to do. that is the first problem.

your cast is in the wrong place. you need to cast the elements of bufferA to char to put them into instring. keep in mind that you potentially lose information this way, as most modern systems use a 32-bit int, and only an 8-bit char.