Feb 26, 2013 at 2:37am
What are you supposed to XOR? XOR takes two operands. You're implying the entries in the vector are one of the two numbers. What is the other?
BTW, at line 14 num is uninitialized. You could skip the whole loop if memory happens to contain -1.
Feb 26, 2013 at 2:37am
xor needs another value after the operator:
34 ^ 89
cout << (vars.at(x) ^ 12) << endl;