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 trial

iOS Objective-C Basics (Retired) Fundamentals of C Arrays

Saiyad Pasha
Saiyad Pasha
187 Points

I have typed in 'float maths_constants[2]' I'm not sure what the problem is.

I am not sure how to proceed, it says add code from previous task? And I have copy and pasted functional code as a template from Xcode here and it still does not seem to work. Thanks for helping!

arrays.c
float maths_constants[2]

2 Answers

William Li
PLUS
William Li
Courses Plus Student 26,868 Points

Couple issues here

  • the Array name should be math_constants not maths_constants
  • don't forget to put the semicolon ; at the end of the statement; syntax-wise, semicolon signals the end of statement in Objective-C, and it's not optional.
float math_constants[2];

hope it helps.

Saiyad Pasha
Saiyad Pasha
187 Points

Thanks! I figured it out right after I posted this haha.