问:在Swift 2.1上工作,这是怎么回事?我将其放入xCode中,并且可以正常工作,但我不断收到“确保您正在使用串联”
string.swift
//在下面输入您的代码
let name = “ Panan” let greeting = “嗨,\(name )。让finalGreeting = “ \(问候)你好吗?
答:let name = “ Panan”
//您省略了字符串和名称常量之间的串联运算符let greeting = “ Hi,+ \(name )。” 让finalGreeting = “ \(问候)你好吗?