Error 1: Class
is the type of classes not the type of any object instances. If you want to accept an instance of any class you can use id
or NSObject *
for the type.
Error 2: monster1
is a variable of type enemy *
(Note: classes by convention start with an uppercase letter, use Enemy
) and will contain a reference to an instance of type enemy
. The expression &monster1
evaluates to the address of the monster1
and is of type enemy **
- a reference to a reference to an enemy
. You should not be using the &
operator.
There are probably other errors & design issues. You appear to have some misunderstandings about Objective-C, classes, objects, references and coding conventions; it might be a good idea to do some studying.
HTH