please explain the code in english

I am writing a program about a game and, someone wrote tis in my source code and i cant understand what it means

if(Label2->Left - Shape1->Left - Shape1->Width + 40 > 1 &&
Label2->Top - Shape1->Top - Shape1->Height - 5 > 1 )
label and shape are pointer to object so you must put -> operator instead of . operator of course you can put (*Lable2).left but its not customary in c++ programmer
Label2->LeftThis means the value named Left that is part of the object pointed to by the pointer named Label2

-
This means subtract.

Shape1->Left
This means the value named Left that is part of the object pointed to by the pointer named Shape1

Is that enough for you to work it out?

The lot says "if this value subtract this value subtract this value plus 40 is bigger than 1, AND this value subtract this value subtract this value subtract 5 is also bigger than one"


Last edited on
i think its enough to work with, thank you
Topic archived. No new replies allowed.