is the "~" a complement? how do i use it? can i use it like this....
bool flag = true;
flag ~= flag;
is the "~" a complement? how do i use it? can i use it like this....
bool flag = true;
flag ~= flag;
'During my service in the United States Congress, I took the initiative in creating the Internet.' - Al Gore, March 9, 1999: On CNN's Late Edition
thats why it didn't work....
thanks.
'During my service in the United States Congress, I took the initiative in creating the Internet.' - Al Gore, March 9, 1999: On CNN's Late Edition
No, why it didn't work is because ~= is not an operator in C++.
You could have written:
a = ~a;
But that is not recommended.
warning C4804: '~' : unsafe use of type 'bool' in operation
warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling