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 trialChance Robertson
2,975 PointsHaving a challenge with this challenge. Anybody catch what I'm missing or doing wrong?
Having a challenge with this challenge. Anybody catch what I'm missing or doing wrong?
struct Location {
let latitude: Double
let longitude: Double
init(latitude: Double, longitude: Double){
self.latitude = latitude
self.longitude = longitude
}
}
class Business {
let name: String
let location: Location
init(name: String, location: Location) {
self.name = name
self.location = location
}
}
let someBusiness = Business(name: "Chances", location: Location (latitude: 13.1, longitude: 31.3)
2 Answers
om patel
738 Pointsclass Business { let name: String let location: Location
init(name: String, location: Double) { self.name = name self.location = location } }
make this changes. also if this doesn't work copy and paste the whole question to better help you.
jakesager
12,023 PointsYour "someBusiness" variable needs another parenthesis at the end.
let someBusiness = Business(name: "Chances", location: Location (latitude: 13.1, longitude: 31.3))
om patel
738 Pointsom patel
738 Pointsclass Business { let name: String let location: Location
init(name: String, location: Double) { self.name = name self.location = location } }