Initialiseur de membre Swift
struct Person {
var name = ""
}
SAMER SAEID
struct Person {
var name = ""
}
struct Person {
// define two properties
var name: String
var age: Int
}
// object of Person with memberwise initializer
var person1 = Person(name: "Dwight", age: 43)
print("Name:", person1.name)
print("Age:", person1.age)