2015-12-28から1日間の記事一覧
// ths -> 1000, hnd -> 100, ten -> 10 // こんな感じのswitch文を用意した var multiplication: Int switch input { case "ths": multiplication = 1000 case "hnd": multiplication = 100 case "ten": multiplication = 10 } が、エラー発生 Main.swift:1…
いまいちピンときていない。とりあえずログをメモ let first: [String] = ["10", "20"] // 足し算する // でも当たり前だが、型が違うのでエラーになる // main.swift:6:25: error: cannot convert value of type 'String' to expected argument type 'Int' …