Logical OR Operator in Project Builder

Hi All,

I'm a beginning programmer learning C on my Mac using Project Builder.  Recently, I've run across a problem using the logical OR operator "||".

When I try to use the || operator in an if-statement, such as

if (x == 0) || (y == 1)

Project Builder doesn't recognize the || operator and gives me an error.

What am I doing wrong?
Who is Participating?
redgateConnect With a Mentor Commented:
if (x == 0) || (y == 1)

should be

if( (x == 0) || (y == 1) )
All Courses

From novice to tech pro — start learning today.