I was trying to use a BOOL from an object in an if else comparison and I got a warning when I wrote player.isUp suggesting I use player->isUp
Why can’t I use dot notation for object BOOLs? And what does -> mean??
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In order to use dot notation, you need to define isUp as a property of the class that your object belongs to. The arrow is standard C syntax for accessing a value from a struct pointer.