Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Error: Bad operand types for binary opperator
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
chalcids




PostPosted: Wed Jan 23, 2013 9:23 am   Post subject: Error: Bad operand types for binary opperator

i am having a problem with this error Error: Bad operand types for binary opperator '||' . I am trying to use an array to check the cards for like two of a kind or three of a kind, it is a video poker game
Sponsor
Sponsor
Sponsor
sponsor
DemonWasp




PostPosted: Wed Jan 23, 2013 9:37 am   Post subject: RE:Error: Bad operand types for binary opperator

Well, presumably one of the arguments was bad (not boolean, because || is a binary [two arguments] boolean operator).

I would guess that you did something like:
code:
if ( variable == 6 || 7 )

when it should be:
code:
if ( variable == 6 || variable == 7)


But, I can't be sure without seeing your existing code, or knowing what you were trying to do at the time.
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: