The ^ operator is used later on in the book, my other C++ book explains it all together like you did. I thought the asm keyword was related to Assembly :smile9:
It is. :) That is inline assembly in C++. It shows the differences between MSVC++ and GCC according to syntax. GCC uses AT&T syntax I believe, which I hate (go Microsoft! on this one... The syntax used by GCC is much less succinct). They both do relatively the same thing however, so I'll explain what my ASM does using the easier to read syntax:
Code:
mov eax, i
xor eax, j
mov dword ptr[x], eax
-- Move the value of i to the eax register (32 bits), xor the value in the eax register with the variable j, which stores the result in the eax register after this instruction is executed. Then we move the value embedded within that eax register off to the variable x, by a 32 bit pointer. dword = 32bits integer, and ptr stands for pointer.