heart2 *heart;
You named your class Hearts2
so use the exact same name, including uppercase.
Secondly you created a variable but this will be nil. If you aren't using ARC (which you should) this will create an uninitialized object.
This will create an instance of Hearts2
, assign it to the local var heart
and add it as a child:
Hearts2 *heart = [Hearts2 node];
[self addChild:heart z:2];