Easy way to convert a string of 0's and 1's into a character? Plain C
Posted
by Nick
on Stack Overflow
See other posts from Stack Overflow
or by Nick
Published on 2010-03-26T05:03:35Z
Indexed on
2010/03/26
5:23 UTC
Read the original article
Hit count: 273
I'm doing a steganography project where I read in bytes from a ppm file and add the least significant bit to an array. So once 8 bytes are read in, I would have 8 bits in my array, which should equal some character in a hidden message. Is there an easy way to convert an array of 0's and 1's into an ascii value? For example, the array: char bits[] = "0,1,1,1,0,1,0,0" would equal 't'. Plain C
© Stack Overflow or respective owner