View Single Post
  #3   Spotlight this post!  
Unread 27-02-2011, 16:57
KART35 KART35 is offline
Registered User
FRC #1622 (Team Spyder)
Team Role: Electrical
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Poway, CA
Posts: 5
KART35 is an unknown quantity at this point
Re: Custom data gathering class crashes user program

ok, ill try that. but i have never seen the left shift operator used like this before
Code:
int switchbox::bin2dec(bool bit[3])
{
	return (bit[0] | (bit[1] << 1) | (bit[2] << 2));
}
can you explain how you are using the bitwise or as well?
__________________
Reply With Quote