Swift: 'Class.type' does not have member named 'variable' -
i have started swift programming language course , need on first program. using playground write anagram program in xcode v6.3.2. logic, first sorting words alphabetically , comparing them. error occurs when declaring word1 , word2 arrays , dictates 'anagram.type' not have member named 'word1'. believe logic correct. struggling understand why error occurs, , how solve it. have looked around online, having difficulty applying find own code. first time using stack overflow. constructive feedback welcomed. import uikit class anagram{ let word1 :string let word2 :string init(word1: string, word2: string){ self.word1 = word1 self.word2 = word2 } var characters1 = array(word1) var characters2 = array(word2) characters1 = characters1.sort() characters2 = characters2.sort() var pos = 0 var match = true while pos < characters2.length && m...