Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS Objective-C Basics (Retired) Functional Programming in C Functions

Extremely unclear challenge after 'scope' chapter in Functional Programming in C. Can't get correct code in.

Challenge uses float variables, which were not discussed in lesson. Unclear 'how much' of implementation is being requested here. Just the final two lines returning the sum? The actual assigning of variables? If floats are to be assigned numbers is that done differently than it is done OUTSIDE a function? No direct assigning of variables in a function was done in the lesson. And the editors error handling is less than no help. I cannot tell what the challenge is looking for. I have tried 20 different combinations of code and none of them pass.

Challenge follows 'scope' lesson, but actually has basis in 'functions' lesson just prior. So challenge is asking for the implementation of a simple function : create "addTwo" float function, and have it return the sum of the two float variables.

1 Answer

Never mind. Answer sorted. Lots of trial and error to get how much challenge wanted and then had to go well outside of Treehouse to get the syntax correct. First time a quiz or challenge has come up that the lesson left me totally prepared to meet. Doesn't bode well that it is still early in the track for me.