+ 1
Value Types
Is it possible to have two variables refer to the same data structure (like an array), considering the fact that an array is a value type? If so, how would u do this?
3 Respostas
+ 7
I didn't understand some words .But here is an example of structure .it may help .it doesn't have arry.
https://code.sololearn.com/cqo3C4czvG0N/?ref=app
+ 2
Thanks!
0
class A{
var a = 0
}
let abc = A()
print(abc.a)
let bb = abc
bb.a = 3
print(bb.a)