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

Aaron Wedd
Aaron Wedd
209 Points

arrays

Im not sure where I'm going wrong in this exercise if someone could help me it would be much appreciated char the_names[]; the_names[0] = 'a'; a = 'alpha'; the_names[1] = 'b'; b = 'bravo';

Aaron Wedd
Aaron Wedd
209 Points

Im not sure how to post a screen shot however it comes up with bummer

2 Answers

Janine Suvak
Janine Suvak
14,954 Points

Hi Aaron, It's been awhile since I did this one so I started from the beginning with your link. The code-challenge checker takes a little getting used to because you have to follow the instructions very literally, including what they tell you to name variables, arrays, etc. Read the fine print too - usually each step in the challenge adds to the code from the previous step. It's been awhile since I did this one so I used your link to start over. First you are to declare to char variables named alpha and bravo and assign them the values of 'a' and 'b': char alpha; char bravo; alpha = 'a'; bravo = 'b'; Then declare a char type array named 'letters' that holds two values: char letters[2]; Next assign alpha to the first item in the array: letters[0] = alpha; And then to assign bravo to the second item in the array: letters[1] = bravo;

So your entire code block at this point should look like: char alpha; char bravo; alpha = 'a'; bravo = 'b'; char letters[2]; letters[0] = alpha; letters[1] = bravo;

Aaron Wedd
Aaron Wedd
209 Points

Thank you so much

Janine Suvak
Janine Suvak
14,954 Points

No problem! Don't forget to check correct answer on the forum. ;)

Rami Bakri
Rami Bakri
782 Points

Worked a treat... Wasn't aware how particular the editor was about following the order of instructions as well, so thanks for the detailed response Janine.