PDA

View Full Version : & operator



Taidhger
01-09-2002, 01:10 PM
What does the & operator in c++ do (as opposed to the && operator?)

SilentStrike
01-10-2002, 04:52 AM
There are two different uses for the & operator. It is a bitwise and as well as the reference operator.

Is it in a piece of code that you are confused over or something?

Taidhger
01-11-2002, 12:48 PM
The '&' operator is used the following way:

return (13 & 4);
OR LATER:

return (13 & 8);

Govtcheez
01-11-2002, 01:03 PM
Refer to this thread:

http://www.cprogramming.com/cboard/showthread.php?s=&threadid=8562