小编Nic*_* L.的帖子

实例成员不能用于'ViewController'类型

class ViewController: UIViewController {    

let fortuneArray = ["You will find true love in the summer.", "Outlook not good", "You may find great success in business soon.", "Watch out for grey cats."]
let randomIndex = Int(arc4random_uniform(fortuneArray.count))

override func viewDidLoad() {
    super.viewDidLoad()
    let randomIndex = Int(arc4random_uniform(UInt32(fortuneArray.count)))
    print("random index: ")
    print(randomIndex)
    // Do any additional setup after loading the view, typically from a nib.
}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
}

// actions
@IBAction …
Run Code Online (Sandbox Code Playgroud)

random arc4random ios swift

11
推荐指数
1
解决办法
9629
查看次数

为什么不是命令"cmake".生成一个makefile?

cmake .在终端运行,它说它生成了一些东西,然后我跑了make,它说

make: *** No targets specified and no makefile found.  Stop.
Run Code Online (Sandbox Code Playgroud)

我猜我错过了我需要做的其他事情,但我无法弄清楚是什么.它应该创建一个make文件,然后我可以构建然后安装.

如果我太模糊,请告诉我我还能为这个问题添加更多内容.

*编辑*

$ cmake .
-- Configuring done
CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run               "cmake
 --help-policy CMP0042" for policy details.  Use the cmake_policy command to
 set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:

  freeglut

This warning is for project developers.  Use -Wno-dev to suppress it.

 -- Generating done …
Run Code Online (Sandbox Code Playgroud)

c++ makefile cmake

6
推荐指数
1
解决办法
9025
查看次数

标签 统计

arc4random ×1

c++ ×1

cmake ×1

ios ×1

makefile ×1

random ×1

swift ×1