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 trialZach Burt
188 PointsI think i found an error.
It says to "Declare an array of type float named math_constants. The array should be big enough to hold 2 numbers." So I tried to do "float math_constants[1]; Wouldn't that be right, How I did it? (It said i had to use 2, not 1).
1 Answer
Steve Hunter
57,712 PointsI think the creation of the array stipulates its size. Accessing the array then takes on the "count from zero" notation.
So you create an array of two elements with a [2] but access the second element with [1].
I think!
Steve.
Zach Burt
188 PointsZach Burt
188 PointsI see what you're saying, I think I must've misread the question.