what does ! mean when its before anything?

I came across a code while studying and was confused by the ! due to where it was placed can anyone help me our on this?

1
2
3
4
  if(S.empty() || !ArePair(S.top(),exp[i]))
				return false;
			else
				S.pop();


notice the ! before the ArePair my assumption is that if it returns false then the "return false" would be activated right?
! is the logical NOT operator. It turns false into true and true into false.

If ArePair(a, b) checks if a and b is a pair, then !ArePair(a, b) will check if a and b is not a pair.
Thank you :)
Topic archived. No new replies allowed.