Hello,everybody.Would you please describe me about the differences between the(|=) ,(^= )
operators?Is it possible to use(&=)instead of the above two assignments and how?

Thanks,

Assignment,compound operators;[ |=,^= and &=]

http://en.wikipedia.org/wiki/Bitwise_operation

The above page describes in detail what each type of operator does. Before I get any criticism, I know it's a wikipedia link and I have already checked it for accuracy.

& = Bitwise AND
| = Bitwise OR
^ = Bitwise XOR (eXclusive OR)
! = Logical NOT
~ = Bitwise NOT

All 5 of the above operators are explained. Also know that learning any or all of these is a lot easier if you understand binary numbers and how to convert from decimal to binary.

NOTE: The operator != shouldn't be confused with &= or ^= and etc. != is a "comparison" and the others are "assignments"

= is used for assignment. (so are += *= |=)
== is used for comparison. (so are >= < %=)

Thanks from Bluefox815 for your answer and good web referrence;Wikipedia.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.