2008-10-27, 02:54 AM
Devil's Sunrise Wrote:Only works for number-variables though, keep that in mind. So basically, your teacher is partly right.
In a digital computer, everything is "number-variables" - that is, binary integers.
Your compiler might balk at xor-ing strings, floating point numbers, or records ("class" "struct" w/e). It might also attempt to do automatic type-conversion to integer, thus ruining your data. But if you can manage to circumvent the compiler's "strong typing", the machine will happily swap any type of data using the xor method.

