Swift: Cannot Store Unsafe Pointers in Array -
I created a small Now I've discovered compact ways to parse the numbers directly into the stream of straight and I tried to apply it this way: But I get the error message: I do not have this error. What is the method of implementing this kind of use in a member variable using such signals? Finally I did not use insecure pointers. This was my last implementation: Try this: OR Target: [Unsecured Poointer & lt; Int & gt;] = [] Targets.append (and prominent) targets.append (and smaller) for the targets.append (& amp; modification) index ... 2 {var scanner = NSScanner (string: component [index ]) If (! Scanner .scanInteger (target [index]) {major = 0 minor = 0 revision = 0 return}} struct to capture the version number.
struct version {var major : Int = 0 var minor: int = 0 var revision: int = 0 init (string: string) {let components = string .componentsSeparatedByString (".") If 1 ... 3 ~ = components.count {var target = [ & Amp; Key, and short, and revision] for index 0 ... 2 {var scanner = NSScanner (string: element [index]) if (! Scanner.scanInteger (target [index]) {major = 0 minor = 0 revision = 0 return}}}}}
The type of '[inout int]' variable is not possible
Update
init (string: string) {component = string .componentsSeparatedByString (".") If 1 ... 3 ~ = components.count {var value = 0 for 0, 0, 0] index .. .. Components.count {var scanner = NSScanner (string: component [index]) (! Scanner.scan intiger (and value [index]) {return}} key = value [0] small = value [1] amendment = value [2]}}
not in-out Unsafe indicator and
unprotected user , only accepts the function
unsafe ??? Indicator & lt; T & gt; Family logic, in-out expression will be passed as related indicator type. See:
var target: [int] = [0,0,0]; For the index 0 ... 2 {var scanner = NSScanner (string: component [index]) if (! Scanner.scx integer (& target [index]) {major = 0 minor = 0 revision = 0 return} } Target = [0] Mild = Goal [1] Modification = Goal [2]
Comments
Post a Comment