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) Functional Programming in C Functions

function addTwo

function addTwo

functions.c
function addTwo = ( float + float );
Michael Pastran
Michael Pastran
4,727 Points

hey is this part of a challenge?

functions have to start with

func not function

you also dont need " ; " at the end of your code.

1 Answer

Juan Martinez
Juan Martinez
1,031 Points

If this is from the objective-c programming course then I think you have the wrong idea on how to do functions. Functions are in the formant of returnType nameOfFunction( inputVariables) . For example to make a function that adds two numbers together you first implement it by doing this:

float addTwo( float a, float b );

then you define it by doing something like this:

float addTwo( float a, float b){ return a + b; }