hi friends,
i have a probelm with finding the bit difference using xor. i have 2 strings and i have to convert the first tring into another. in order to convert i should get the cost by finding the bit difference when comparing 2 characters of the strings. i am trying to use xor but m not getting success....
please suggest me with a sample code as to how to use xor.
thanking you,
Nabh.
I don't understand how a 'xor' operation can change one string to another one
unless both strings have equal length. If that is so, there's not much 'cost' to
calculate, i.e. you just change the different characters using that 'xor' thing.
If both strings *don't* have an equal length then I don't understand your question.
Care to elaborate?
kind regards,
Jos
ps. or are you 'xoring' the trailing '\0' byte too?