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 trialboris said
3,607 PointsI am having error where print statement won't work. Please help!
Here is my code:
protocol Printable {
func description() -> String
}
struct User: Printable {
let name: String
let age: Int
let address: String
func description() -> String {
return "\(name), \(age), \(address)"
}
}
let user = User(name: "Boris", age: 12, address: "Some address")
print.(user.description())
2 Answers
Alexander Davison
65,469 PointsI don't know why, but there's a period between the word print and (user.description()). Try getting rid of that period :)
Good luck!
Hope this helps, Alex
boris said
3,607 PointsThanks for your help!