WhiteDouglas 2016-02-08 17:13 采纳率: 50%
浏览 1534

Swift语法错误的问题求大神讲解

import Foundation

let useInput = "To write the code for class , you must provide three chunks or sentions of code"
var OutputCount = 0
for chares in useInput {
switch chares {
case "a","e","i","o","u":
continue
default:
OutputCount++
}
}
print(String(OutputCount))

提示错误:
type string does not conform to protocol sequencetype

请问如何修改呀?
这是书上的源代码呀,难道是Swift语法又修改了?

  • 写回答

2条回答 默认 最新

报告相同问题?