if this or this then that

Hi, I just started doing some stuff with C++ a few hours ago and I have a little question. I know you can have if this then that, but can you also have twice this?
like if this1 is x = 7 and this2 is y=7 then action? If it's possible how would I write it? I'm using Microsoft Visual C++ 2010 express. Thanks!
Yup, C++ has a lot of different operators including logical operators. Take a look here: http://www.cplusplus.com/doc/tutorial/operators/

in your case this would be
if(x == 7 && y == 7)
   //do something 

btw. = is an assignment operator, not a comparison operator, which is ==.
Topic archived. No new replies allowed.