I am in my playground. I was trying to use the arc4random_uniform func but I get this error: Use of unresolved identifier 'arc4random_uniform'
can I use another func instead?
I am in my playground. I was trying to use the arc4random_uniform func but I get this error: Use of unresolved identifier 'arc4random_uniform'
can I use another func instead?
Make sure you at least have imported import Foundation. Or platform specific import UIKit for iOS or import Cocoa for OSX.
arc4random_uniform is apple platform only (from UIKit).
If your playground is hosted on linux, it should not work.
Use rand() or Int/Double/Bool.Int.random()