View Single Post
  #15   Spotlight this post!  
Unread 18-01-2004, 00:22
SeanCassidy's Avatar
SeanCassidy SeanCassidy is offline
Antiregistered User
#0263 (Aftershock)
Team Role: Programmer
 
Join Date: Oct 2003
Location: Holtsville, NY
Posts: 37
SeanCassidy is an unknown quantity at this point
Re: Logical And Bitwise AND

And if I remember correctly, & can be used to make a reference to a variable or other thing, but doesn't require the pointer syntax. (NOTE: This is out of my C++ Book and I do not have any idea if it does go for C, it might)

Code:
int ival = 1024;
int &refVal = ival;        // ok: refVal is a reference to ival
int &refVal2;               // no: refVal2 needs to be initalized.
Not wanting to bring up the flame war on this "heated" discussion (hehe), but just so you know ampersand (&) is the address-of operator, bitwise AND, logical AND (in pairs, &&), and reference operator. So watch those &'s!