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 Object-Oriented Swift Complex Data Structures Adding Instance Methods

Khaled M
Khaled M
829 Points

I'm stuck, again.

Is there a way to see the solutions?

I end up wasting so much time trying to figure out the problem, when it's something that I was never clearly taught in the first place. I can understand this teaching method if they were to provide the solution if the student has exhausted all options. If this is truly the case, I'm going to cancel my subscription.

struct Person {
    let firstName: String
    let lastName: String

    func fullName(firstName: String, lastName: String) -> String {
      return(firstName, lastName)

1 Answer

Gavin Butler
.a{fill-rule:evenodd;}techdegree seal-36
Gavin Butler
iOS Development with Swift Techdegree Graduate 15,489 Points

Hi Khaled, Don't give up - I feel the same as you often. I think for this exercise the full name was to contain a space, so the following worked for me (note there is a space between first name & last name below): func fullName() -> String { return "(firstName) (lastName)" }

Hope this helps.