stored property "text" without initial value prevents synthesized initializers

Viewed 15333

I'm learning swift and have came up with the simple code below.

class ARandom{
    var number: Int = 0
    var text: String
}

However, Xcode displays the following Error:

stored property "text" without initial value prevents synthesized initializers

Why is this happening? what is an synthesized initialiser? why "text" without initial value prevents systhesised initialiser? Could someone please kindly explain it to me? THanks in advance for any help!

1 Answers
Related