Page 73 -- adding _weak causes build to fail


I’m on the portion where you change the container instance variable to be a weak reference with:

When I add _weak I get an error on that line that says “Expected ; at the end of declaration list” and “Unknown type name ‘_weak’”

Here’s a snippet of that portion of my code and note that everything works if I remove “_weak”

[code]@interface BNRItem : NSObject

NSString *_itemName;
NSString *_serialNumber;
int _valueInDollars;
NSDate *_dateCreated;

BNRItem *_containedItem;
_weak BNRItem *_container;


Thanks in advance!


try using two underscores


[quote=“xjames”]try using two underscores

That worked, thanks!