I have a question about something simple that works in Playground but not in a Project: (Playground code below)
In the project where the class is in a separate swift file the code correction won't show me the the person.lastName and if I fully type it give me an error.... hmm, very strange - might be a beginner error or?
How would I have to state in in the program file and the separate swift file to work?
Thanks, Roman
import UIKit
class human {
var firstName = ""
var lastName = ""
}
let person = human()
person.lastName = "Smith"
person.firstName = "Peter"
print (person.firstName)
print (person.lastName)