Thursday, February 21, 2013

map english words to byte


char map_english_words(string word)
{
char xorsum=0;
for(int i=0;i<word.length();i++)
{
xorsum^=word[i];
}
return xorsum;
}


char map=map_english_words("k");
char buffer[256];
itoa((int)map,buffer,2);
cout<<buffer<<endl;
system("pause");

(bitwise output)

____________________________________


huffman coding

No comments:

Post a Comment