How to use if statements with variables of an object?

If I have an object of a class which has three variables (say Width, Length, Height):

1
2
CubeClass BoxA(20, 10, 15);
//... 

What I want to do is 'if BoxA's Height is > 5, this..', but I have no idea how. If this were an array, I could just do a for loop then 'if array[i] == x, this..', but that's obviously not possible here.

This is probably a dumb question - I'm still getting the hang of Classes. Thanks in advance!
1
2
3
4
if(BoxA.Height > 5)
{
  // Do something...
}

Wow. I'll mark this as answered so it can deservedly die.
Topic archived. No new replies allowed.