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!
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 trial
Stuck in a code challenge
this is the task number 1. " Create a float variable name radius whit the value of 14.5..." i wrote the obvius: float radius = 14.5; But when i press "check work" nothing happens. Someone knows what i am doing wrong?
Steven Chin2,001 Points
I think with Objective-C, you may have to append a type to the number. For example:
float radius = 14.5f; where 'f' tells the compiler the type that will be held.
I believe you can also cast the number as well: float radius = (float)14.5;
I am not too sure about this so try it out and see what happens.
Treehouse support give the answer! I was using google chrome so i try with a incognito mode and works. Thank you!