Error on one struct but not on the other

Why the difference between Person1 and Person2?
No description
4 Replies
aelfled
aelfled14mo ago
your syntax is invalid in Person2, you are assigning rather than declaring the type, so it wants an argument like String(repeating: "Foo", count: 2)
Pointer
Pointer14mo ago
sorry, what do repeating and count mean? I don't understand
aelfled
aelfled14mo ago
they are init arguments for the String struct type
Pointer
Pointer14mo ago
I see, thank you!
Want results from more Discord servers?
Add your server