Array types are now written with the brackets around the element type问题的解决方法

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Array types are now written with the brackets around the element type问题的解决方法相关的知识,希望对你有一定的参考价值。

在xcode6.1中来编写swift空数组时。出现的的这个问题,依照官方 Swift 教程《The Swift Programming Language》来写
let emptyArray = String[]() 时会提示“Array types are now written with the brackets around the element type”错误,正确的写法应该是

let emptyArray = [String]() 其他类型类似来处理就可以

以上是关于Array types are now written with the brackets around the element type问题的解决方法的主要内容,如果未能解决你的问题,请参考以下文章

Vmware虚拟机有一天出现“Disconnected-you are now offline”无法连接网络的情况

Vmware虚拟机有一天出现“Disconnected-you are now offline”无法连接网络的情况

There Are Now 3 Apache Spark APIs. Here’s How to Choose the Right One

If you only do what you can do you'll never be more than you are now.

PHP Warning: array_multisort(): Array sizes are inconsistent

All data types in Python are “reference type“