iOS Swift - Swift Language Essentials
The following Swift code tries to modify a property of a struct instance inside a function but causes a compile error:
What is the main reason for the error?
struct Counter {
var count: Int
}
func increment(counter: Counter) {
counter.count += 1
}What is the main reason for the error?
