View Single Post
  #2 (permalink)  
Old 03-21-2008, 10:05 PM
hardwired hardwired is offline
Senior Member
 
Join Date: Jul 2007
Posts: 1,222
hardwired is on a distinguished road
Code:
if ((housing = 1) && (hours>=18))
housing = 1 is an assignment:
It assigns the value of one (1) to the "housing" variable.
To make this statement a boolean use the "==" operator:
Code:
if ((housing == 1) && (hours >= 18)) // or if (housing == 1 && hours >= 18)
Reply With Quote