Problem with an equation
| nilsson (3) | |||||
Im using this code to encrypt a text
and this to decrypt
but the decryption dosent work as wanted :/ any tips on what the problem is? | |||||
| DiptenduDas (84) | |||
| Hi nilsson, In the decrypt function after 1st iteration i gets decremented to -1, which will be creating problem for a[i]. Also keep a close look in to the Precedence of C++ Operator ..... | |||
| guestgulkan (481) | |||
| I agree with DiprenduDas ---- that bit of math(s) is very suspicious | |||
| Zaita (1577) | |||
| Formatting pls, this isn't the obfuscated C contest. Your encryption code looks fine, but your decryption is a little off as you have said. Remember, to Decrypt you need to do the exact opposite of what you have done to encrypt. This can be as simple as changing 1 operator and your target for the assignment. e.g.
| |||
This topic is archived - New replies not allowed.
