Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialCaleb Kleveter
Treehouse Moderator 37,862 PointsI still can't figure out this code challenge
I have tried to figure out this code challenge for several weeks now and I finally tried to do something out of the ordinary and it got me closer then I've been in awhile but not close enough. below is what the preview says and below that is my code:
cannot initialize a variable of type 'id *' with an rvalue of type 'NSArray *'
id *thing = @[@"nil"];
^ ~~~~~~~~~
1 error generated.
id *thing = @[@"nil"];
2 Answers
Stone Preston
42,016 Pointsvariables of type id are already pointers, so you dont need to use a * when naming them.
also it asks for the value to be nil, not @["nil"]
id thing = nil;
Caleb Kleveter
Treehouse Moderator 37,862 PointsIf you got the post I deleted you can ignore it, I don't now how long it took to finish that code challenge but I finally did it! Thanks for your help!
Stone Preston
42,016 Pointsno problem, glad you got it working