Qt C++ Modulo Operator Failing -


this simple issue overlooking. writing in c++ on qt , working on ciphers. have use %26 in order them working. tested this: qdebug() << (6-18)%26; , according internet , math, should produce me number 14, right? no. -12 6-18 is, don't know if modulo isn't being applied of what. appreciated.

you right on this: 6-18 = -12

when divide: -12/26 = 0.46

with modulus = 4

i hope you.


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -